Just Dance Wiki justdancewiki https://justdance.miraheze.org/wiki/Main_Page MediaWiki 1.41.0 first-letter Media Special Talk User User talk Just Dance Wiki Just Dance Wiki talk File File talk MediaWiki MediaWiki talk Template Template talk Help Help talk Category Category talk Campaign Campaign talk TimedText TimedText talk Module Module talk Translations Translations talk Main Page 0 1 1 2024-02-08T05:33:14Z MediaWiki default 1 Welcome to Miraheze! wikitext text/x-wiki __NOTOC__ == Welcome to {{SITENAME}}! == This Main Page was created automatically and it seems it hasn't been replaced yet. === For the bureaucrat(s) of this wiki === Hello, and welcome to your new wiki! Thank you for choosing Miraheze for the hosting of your wiki, we hope you will enjoy our hosting. You can immediately start working on your wiki or whenever you want. Need help? No problem! We will help you with your wiki as needed. To start, try checking out these helpful links: * [[mw:Special:MyLanguage/Help:Contents|MediaWiki guide]] (e.g. navigation, editing, deleting pages, blocking users) * [[meta:Special:MyLanguage/FAQ|Miraheze FAQ]] * [[meta:Special:MyLanguage/Request features|Request settings changes on your wiki]]. (Extensions, Skin and Logo/Favicon changes should be done through [[Special:ManageWiki]] on your wiki, see [[meta:Special:MyLanguage/ManageWiki|ManageWiki]] for more information.) ==== I still don't understand X! ==== Well, that's no problem. Even if something isn't explained in the documentation/FAQ, we are still happy to help you. You can find us here: * [[meta:Special:MyLanguage/Help center|On our own Miraheze wiki]] * On [[phab:|Phabricator]] * On [https://miraheze.org/discord Discord] * On IRC in #miraheze on irc.libera.chat ([irc://irc.libera.chat/%23miraheze direct link]; [https://web.libera.chat/?channel=#miraheze webchat]) === For visitors of this wiki === Hello, the default Main Page of this wiki (this page) has not yet been replaced by the bureaucrat(s) of this wiki. The bureaucrat(s) might still be working on a Main Page, so please check again later! 21236ac3f8d65e5563b6da6b70815ca6bf1e6616 2 1 2024-02-09T01:10:27Z Aniceto 2 /* Welcome to {{SITENAME}}! */ wikitext text/x-wiki __NOTOC__ == Welcome to {{SITENAME}}! == This is a new Wiki about all things related to the Ubisoft Original Game "Just Dance". === For the bureaucrat(s) of this wiki === Hello, and welcome to your new wiki! Thank you for choosing Miraheze for the hosting of your wiki, we hope you will enjoy our hosting. You can immediately start working on your wiki or whenever you want. Need help? No problem! We will help you with your wiki as needed. To start, try checking out these helpful links: * [[mw:Special:MyLanguage/Help:Contents|MediaWiki guide]] (e.g. navigation, editing, deleting pages, blocking users) * [[meta:Special:MyLanguage/FAQ|Miraheze FAQ]] * [[meta:Special:MyLanguage/Request features|Request settings changes on your wiki]]. (Extensions, Skin and Logo/Favicon changes should be done through [[Special:ManageWiki]] on your wiki, see [[meta:Special:MyLanguage/ManageWiki|ManageWiki]] for more information.) ==== I still don't understand X! ==== Well, that's no problem. Even if something isn't explained in the documentation/FAQ, we are still happy to help you. You can find us here: * [[meta:Special:MyLanguage/Help center|On our own Miraheze wiki]] * On [[phab:|Phabricator]] * On [https://miraheze.org/discord Discord] * On IRC in #miraheze on irc.libera.chat ([irc://irc.libera.chat/%23miraheze direct link]; [https://web.libera.chat/?channel=#miraheze webchat]) === For visitors of this wiki === Hello, the default Main Page of this wiki (this page) has not yet been replaced by the bureaucrat(s) of this wiki. The bureaucrat(s) might still be working on a Main Page, so please check again later! 12ac58e3c4bf112e467d45910136caef9efc6ca5 3 2 2024-02-09T02:03:07Z Aniceto 2 wikitext text/x-wiki __NOTOC__ == Welcome to {{SITENAME}}! == This is a new Wiki about all things related to Ubisoft's original "Just Dance" game. hosting. want. links: * users) * [[meta:Special:MyLanguage/FAQ|FAQ]] * information.) ==== X! ==== here: * [[meta:Special:MyLanguage/Help center|wiki]] * [[phab:|Phabricator]] * [https://miraheze.org/discord Discord] * [https://web.libera.chat/?channel=#miraheze webchat]) === wiki === 8c009466f065d978321ac689bbd8b2e8e6925596 4 3 2024-02-09T02:04:15Z Aniceto 2 wikitext text/x-wiki __NOTOC__ == Welcome to {{SITENAME}}! == This is a new Wiki about all things related to Ubisoft's original "Just Dance" game. 0ca20c7272b87f1a4bb6080a7c19682b1a94531c 5 4 2024-02-09T02:05:04Z Aniceto 2 /* Welcome to Just Dance Wiki! */ wikitext text/x-wiki __NOTOC__ == Welcome to {{SITENAME}}! == This is a new Wiki about all things related to Ubisoft's original game "Just Dance". c79d9c9474d98441b072d9dd9046832cf57d2520 6 5 2024-02-09T02:22:58Z Aniceto 2 /* Welcome to {{SITENAME}}! */ wikitext text/x-wiki __NOTOC__ == Welcome to {{SITENAME}}! == This is a new Wiki about all things related to Ubisoft's original game "Just Dance". ==== FAQ ==== ===== What is Just Dance about? ===== Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! ===== Which game was the last one released? ===== Since Just Dance 2023 Edition, Just Dance is a free app with some demo songs, and the yearly iterations are now song packs. The latest release was Just Dance 2024 Edition. 0783697108475c077c902ab43ea4d3a73ce60250 7 6 2024-02-09T02:40:23Z Aniceto 2 wikitext text/x-wiki __NOTOC__ == Welcome to {{SITENAME}}! == This is a new Wiki about all things related to Ubisoft's original game "Just Dance". ==== FAQ ==== ===== What is Just Dance about? ===== Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! ===== Which game was the last one released? ===== Since Just Dance 2023 Edition, Just Dance is a free app with some demo songs, and the yearly iterations are now song packs. The latest release was Just Dance 2024 Edition. == This year's songlist == ===== Solos ===== * Song A ===== Duets ===== * Song A ===== Trios ===== * Song A ===== Quartets ===== * Song A ===== Alternates ===== * Song A ==== Just Dance+ ==== Subscription-exclusive songs related to this year's game. ===== Solos ===== * Song A ===== Duets ===== * Song A ===== Trios ===== * Song A ===== Quartets ===== * Song A 33a0e123673d7f9c4be20c3f727474520c760a09 8 7 2024-02-09T02:42:18Z Aniceto 2 /* Which game was the last one released? */ wikitext text/x-wiki __NOTOC__ == Welcome to {{SITENAME}}! == This is a new Wiki about all things related to Ubisoft's original game "Just Dance". ==== FAQ ==== ===== What is Just Dance about? ===== Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! ===== Which game was the last one released? ===== Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs, and the yearly iterations are now song packs, as well as a subscription-based service, named Just Dance+ The latest release was Just Dance 2024 Edition. == This year's songlist == ===== Solos ===== * Song A ===== Duets ===== * Song A ===== Trios ===== * Song A ===== Quartets ===== * Song A ===== Alternates ===== * Song A ==== Just Dance+ ==== Subscription-exclusive songs related to this year's game. ===== Solos ===== * Song A ===== Duets ===== * Song A ===== Trios ===== * Song A ===== Quartets ===== * Song A 52ce867aa2927b87da08b90738986ee795b11896 9 8 2024-02-09T02:46:07Z Aniceto 2 /* This year's songlist */ wikitext text/x-wiki __NOTOC__ == Welcome to {{SITENAME}}! == This is a new Wiki about all things related to Ubisoft's original game "Just Dance". ==== FAQ ==== ===== What is Just Dance about? ===== Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! ===== Which game was the last one released? ===== Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs, and the yearly iterations are now song packs, as well as a subscription-based service, named Just Dance+ The latest release was Just Dance 2024 Edition. == This year's songlist == === Classic === ===== Solos ===== * Song A ===== Duets ===== * Song A ===== Trios ===== * Song A ===== Quartets ===== * Song A === Alternates === '''Alternate version of some Classic maps''' ===== Solos ===== * Song A ===== Duets ===== * Song A === Just Dance+ === '''Subscription-exclusive songs related to this year's game.''' ===== Solos ===== * Song A ===== Duets ===== * Song A ===== Trios ===== * Song A ===== Quartets ===== * Song A f70a35160e94d5b810c3026c11dea5e6b8fff771 10 9 2024-02-09T02:50:53Z Aniceto 2 wikitext text/x-wiki __NOTOC__ == Welcome to {{SITENAME}}! == This is a new Wiki about all things related to Ubisoft's original game "Just Dance". ==== FAQ ==== ===== What is Just Dance about? ===== Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! ===== Which game was the last one released? ===== Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs, and the yearly iterations are now song packs, as well as a subscription-based service, named Just Dance+ The latest release was Just Dance 2024 Edition. ea72b348fdc27e9164c5943dfeab033d6ec4abc5 11 10 2024-02-09T03:08:16Z Aniceto 2 Prepared the page for translation wikitext text/x-wiki <languages/> <translate> __NOTOC__ == Welcome to {{SITENAME}}! == This is a new Wiki about all things related to Ubisoft's original game "Just Dance". ==== FAQ ==== ===== What is Just Dance about? ===== Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! ===== Which game was the last one released? ===== Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs, and the yearly iterations are now song packs, as well as a subscription-based service, named Just Dance+ The latest release was Just Dance 2024 Edition. </translate> 62602c3fbabb22c9a0730c68f6a4c7a88f015cde 12 11 2024-02-09T03:09:08Z Aniceto 2 Marked this version for translation wikitext text/x-wiki <languages/> <translate> <!--T:1--> __NOTOC__ == Welcome to {{SITENAME}}! == <!--T:2--> <!--T:3--> This is a new Wiki about all things related to Ubisoft's original game "Just Dance". ==== FAQ ==== <!--T:4--> ===== What is Just Dance about? ===== <!--T:5--> <!--T:6--> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! ===== Which game was the last one released? ===== <!--T:7--> <!--T:8--> Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs, and the yearly iterations are now song packs, as well as a subscription-based service, named Just Dance+ The latest release was Just Dance 2024 Edition. </translate> 48ad0ce631c221c041ffc80b0926264b288af6ad 31 12 2024-02-09T10:09:07Z Aniceto 2 wikitext text/x-wiki <languages/> <translate> <!--T:1--> __NOTOC__ == Welcome to {{SITENAME}}! == <!--T:2--> <!--T:3--> This is a new Wiki about all things related to Ubisoft's original game "Just Dance". ==== FAQ ==== <!--T:4--> ===== What is Just Dance about? ===== <!--T:5--> <!--T:6--> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! ===== Which game was the last one released? ===== <!--T:7--> <!--T:8--> Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs. Because of that, the yearly iterations are now song packs. Also, theres a subscription-based service, named Just Dance+, thats lets players dance to songs from old versions of the game, as well as some exclusive ones. The latest release was Just Dance 2024 Edition. </translate> 6dbc9622112e0832fa31dc2c2cb11e724a2dd5b5 32 31 2024-02-09T10:11:29Z Aniceto 2 wikitext text/x-wiki <languages/> <translate> __NOTOC__ == Welcome to {{SITENAME}}! == <!--T:1--> <!--T:2--> This is a new Wiki about all things related to Ubisoft's original game "Just Dance". ==== FAQ ==== <!--T:3--> ===== What is Just Dance about? ===== <!--T:4--> <!--T:5--> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! ===== Which game was the last one released? ===== <!--T:6--> <!--T:7--> Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs. Because of that, the yearly iterations are now song packs. Also, theres a subscription-based service, named Just Dance+, thats lets players dance to songs from old versions of the game, as well as some exclusive ones. The latest release was Just Dance 2024 Edition. </translate> a9e2736005ceab1eb5049e6a03d01f7689e39f96 37 32 2024-02-09T10:24:44Z Aniceto 2 wikitext text/x-wiki <languages/> <translate> __NOTOC__ == Welcome to {{SITENAME}}! == <!--T:1--> <!--T:2--> This is a new Wiki about all things related to Ubisoft's original game "Just Dance". ==== FAQ ==== <!--T:3--> ===== What is Just Dance about? ===== <!--T:4--> <!--T:5--> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! ===== Which game was the last one released? ===== <!--T:6--> <!--T:7--> Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs. Because of that, the yearly iterations are now song packs. Also, theres a subscription-based service, named Just Dance+, thats lets players dance to songs from old versions of the game, as well as some exclusive ones. The latest release was Just Dance 2024 Edition. ===== Which is the current Just Dance+ Season? <!--T:8--> <!--T:9--> The current Just Dance+ Season is the 1st of this year's edition, titled Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. </translate> c07b364c5a5265dbe8429eea5e63a8e62015107d 38 37 2024-02-09T10:55:47Z Aniceto 2 Marked this version for translation wikitext text/x-wiki <languages/> <translate> <!--T:10--> __NOTOC__ == Welcome to {{SITENAME}}! == <!--T:1--> <!--T:2--> This is a new Wiki about all things related to Ubisoft's original game "Just Dance". ==== FAQ ==== <!--T:3--> ===== What is Just Dance about? ===== <!--T:4--> <!--T:5--> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! ===== Which game was the last one released? ===== <!--T:6--> <!--T:7--> Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs. Because of that, the yearly iterations are now song packs. Also, theres a subscription-based service, named Just Dance+, thats lets players dance to songs from old versions of the game, as well as some exclusive ones. The latest release was Just Dance 2024 Edition. <!--T:8--> ===== Which is the current Just Dance+ Season? <!--T:9--> The current Just Dance+ Season is the 1st of this year's edition, titled Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. </translate> 7ffb885508909973dea7179eaa7173f52db06ee2 Translations:Main Page/Page display title/pt-br 1198 2 13 2024-02-09T09:53:46Z Aniceto 2 Created page with "Página Principal" wikitext text/x-wiki Página Principal 6d47cc48e98d9545d5746bfd0d2fdf43ae38235c Main Page/pt-br 0 3 14 2024-02-09T09:53:50Z Aniceto 2 Created page with "Página Principal" wikitext text/x-wiki <languages/> <div lang="en" dir="ltr" class="mw-content-ltr"> __NOTOC__ </div> <div lang="en" dir="ltr" class="mw-content-ltr"> == Welcome to {{SITENAME}}! == </div> <div lang="en" dir="ltr" class="mw-content-ltr"> This is a new Wiki about all things related to Ubisoft's original game "Just Dance". </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ==== FAQ ==== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===== What is Just Dance about? ===== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===== Which game was the last one released? ===== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs, and the yearly iterations are now song packs, as well as a subscription-based service, named Just Dance+ The latest release was Just Dance 2024 Edition. </div> 4a9a26d9873c5a40fd1dd3ce999117d4ff3fcf4f 16 14 2024-02-09T09:54:01Z Aniceto 2 Created page with "_NOTOC_" wikitext text/x-wiki <languages/> _NOTOC_ <div lang="en" dir="ltr" class="mw-content-ltr"> == Welcome to {{SITENAME}}! == </div> <div lang="en" dir="ltr" class="mw-content-ltr"> This is a new Wiki about all things related to Ubisoft's original game "Just Dance". </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ==== FAQ ==== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===== What is Just Dance about? ===== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===== Which game was the last one released? ===== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs, and the yearly iterations are now song packs, as well as a subscription-based service, named Just Dance+ The latest release was Just Dance 2024 Edition. </div> e7d19eb395397c21429f45d080cba9c1f081c45e 18 16 2024-02-09T09:54:58Z Aniceto 2 Created page with "== Seja bem-vindo a {{SITENAME}}! ==" wikitext text/x-wiki <languages/> _NOTOC_ <span id="Welcome_to_{{SITENAME}}!"></span> == Seja bem-vindo a {{SITENAME}}! == <div lang="en" dir="ltr" class="mw-content-ltr"> This is a new Wiki about all things related to Ubisoft's original game "Just Dance". </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ==== FAQ ==== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===== What is Just Dance about? ===== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===== Which game was the last one released? ===== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs, and the yearly iterations are now song packs, as well as a subscription-based service, named Just Dance+ The latest release was Just Dance 2024 Edition. </div> f7d5937a760a3f620e358802fd90845cc9defe21 20 18 2024-02-09T09:56:08Z Aniceto 2 Created page with "Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance"." wikitext text/x-wiki <languages/> _NOTOC_ <span id="Welcome_to_{{SITENAME}}!"></span> == Seja bem-vindo a {{SITENAME}}! == Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". <div lang="en" dir="ltr" class="mw-content-ltr"> ==== FAQ ==== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===== What is Just Dance about? ===== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===== Which game was the last one released? ===== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs, and the yearly iterations are now song packs, as well as a subscription-based service, named Just Dance+ The latest release was Just Dance 2024 Edition. </div> 0c120be91ab8eb4d9db909d75815238875a6c919 22 20 2024-02-09T09:56:44Z Aniceto 2 Created page with "==== Perguntas Frequentes ====" wikitext text/x-wiki <languages/> _NOTOC_ <span id="Welcome_to_{{SITENAME}}!"></span> == Seja bem-vindo a {{SITENAME}}! == Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". <span id="FAQ"></span> ==== Perguntas Frequentes ==== <div lang="en" dir="ltr" class="mw-content-ltr"> ===== What is Just Dance about? ===== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===== Which game was the last one released? ===== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs, and the yearly iterations are now song packs, as well as a subscription-based service, named Just Dance+ The latest release was Just Dance 2024 Edition. </div> 359143d7ee018a20d9e5807b84aad008bb3fd47c 24 22 2024-02-09T09:57:28Z Aniceto 2 Created page with "===== Sobre o que é o Just Dance? =====" wikitext text/x-wiki <languages/> _NOTOC_ <span id="Welcome_to_{{SITENAME}}!"></span> == Seja bem-vindo a {{SITENAME}}! == Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". <span id="FAQ"></span> ==== Perguntas Frequentes ==== <span id="What_is_Just_Dance_about?"></span> ===== Sobre o que é o Just Dance? ===== <div lang="en" dir="ltr" class="mw-content-ltr"> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===== Which game was the last one released? ===== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs, and the yearly iterations are now song packs, as well as a subscription-based service, named Just Dance+ The latest release was Just Dance 2024 Edition. </div> 706313f3dc29cc201d2cd4c8daf08fc046f1dc70 26 24 2024-02-09T10:03:41Z Aniceto 2 Created page with "===== Qual foi o último jogo lançado? =====" wikitext text/x-wiki <languages/> _NOTOC_ <span id="Welcome_to_{{SITENAME}}!"></span> == Seja bem-vindo a {{SITENAME}}! == Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". <span id="FAQ"></span> ==== Perguntas Frequentes ==== <span id="What_is_Just_Dance_about?"></span> ===== Sobre o que é o Just Dance? ===== <div lang="en" dir="ltr" class="mw-content-ltr"> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! </div> <span id="Which_game_was_the_last_one_released?"></span> ===== Qual foi o último jogo lançado? ===== <div lang="en" dir="ltr" class="mw-content-ltr"> Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs, and the yearly iterations are now song packs, as well as a subscription-based service, named Just Dance+ The latest release was Just Dance 2024 Edition. </div> 184361eedc90f1e40fc9edbd364fabdbd119d157 28 26 2024-02-09T10:05:53Z Aniceto 2 Created page with "Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo, e os lançamentos anuais agora são pacotes musicais, além do serviço de assinatura, chamado Just Dance+. O último lançamento foi o Just Dance 2024 Edition." wikitext text/x-wiki <languages/> _NOTOC_ <span id="Welcome_to_{{SITENAME}}!"></span> == Seja bem-vindo a {{SITENAME}}! == Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". <span id="FAQ"></span> ==== Perguntas Frequentes ==== <span id="What_is_Just_Dance_about?"></span> ===== Sobre o que é o Just Dance? ===== <div lang="en" dir="ltr" class="mw-content-ltr"> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! </div> <span id="Which_game_was_the_last_one_released?"></span> ===== Qual foi o último jogo lançado? ===== Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo, e os lançamentos anuais agora são pacotes musicais, além do serviço de assinatura, chamado Just Dance+. O último lançamento foi o Just Dance 2024 Edition. aac177626eff774f85a21ac708f9a32d6b10e4a9 30 28 2024-02-09T10:06:04Z Aniceto 2 Created page with "Começando com o jogo Just Dance, para Wii, em 2009, se tornou uma grande franquia com uma longa lista de versões. No jogo, os jogadores seguem os movimentos de dança dos treinadores na tela, recebendo feedbaks sobre quão bem estão dançando. No modo multijogador, o jogador com mais pontos (e, consequentemente, estrelas) vence! Destinado a todos os tipos de público, Just Dance é o jogo perfeito para reuniões de família e festas!" wikitext text/x-wiki <languages/> _NOTOC_ <span id="Welcome_to_{{SITENAME}}!"></span> == Seja bem-vindo a {{SITENAME}}! == Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". <span id="FAQ"></span> ==== Perguntas Frequentes ==== <span id="What_is_Just_Dance_about?"></span> ===== Sobre o que é o Just Dance? ===== Começando com o jogo Just Dance, para Wii, em 2009, se tornou uma grande franquia com uma longa lista de versões. No jogo, os jogadores seguem os movimentos de dança dos treinadores na tela, recebendo feedbaks sobre quão bem estão dançando. No modo multijogador, o jogador com mais pontos (e, consequentemente, estrelas) vence! Destinado a todos os tipos de público, Just Dance é o jogo perfeito para reuniões de família e festas! <span id="Which_game_was_the_last_one_released?"></span> ===== Qual foi o último jogo lançado? ===== Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo, e os lançamentos anuais agora são pacotes musicais, além do serviço de assinatura, chamado Just Dance+. O último lançamento foi o Just Dance 2024 Edition. 931bd3742187848cfba48069cda69b32c9a92cbd 34 30 2024-02-09T10:14:25Z Aniceto 2 wikitext text/x-wiki <languages/> __NOTOC__ <span id="Welcome_to_{{SITENAME}}!"></span> == Seja bem-vindo a {{SITENAME}}! == Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". <span id="FAQ"></span> ==== Perguntas Frequentes ==== <span id="What_is_Just_Dance_about?"></span> ===== Sobre o que é o Just Dance? ===== Começando com o jogo Just Dance, para Wii, em 2009, se tornou uma grande franquia com uma longa lista de versões. No jogo, os jogadores seguem os movimentos de dança dos treinadores na tela, recebendo feedbaks sobre quão bem estão dançando. No modo multijogador, o jogador com mais pontos (e, consequentemente, estrelas) vence! Destinado a todos os tipos de público, Just Dance é o jogo perfeito para reuniões de família e festas! <span id="Which_game_was_the_last_one_released?"></span> ===== Qual foi o último jogo lançado? ===== Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo, e os lançamentos anuais agora são pacotes musicais, além do serviço de assinatura, chamado Just Dance+. O último lançamento foi o Just Dance 2024 Edition. 5f38ba6c73a25ba05ec41420bd85d6463c53de7b 36 34 2024-02-09T10:18:07Z Aniceto 2 wikitext text/x-wiki <languages/> __NOTOC__ <span id="Welcome_to_{{SITENAME}}!"></span> == Seja bem-vindo a {{SITENAME}}! == Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". <span id="FAQ"></span> ==== Perguntas Frequentes ==== <span id="What_is_Just_Dance_about?"></span> ===== Sobre o que é o Just Dance? ===== Começando com o jogo Just Dance, para Wii, em 2009, se tornou uma grande franquia com uma longa lista de versões. No jogo, os jogadores seguem os movimentos de dança dos treinadores na tela, recebendo feedbaks sobre quão bem estão dançando. No modo multijogador, o jogador com mais pontos (e, consequentemente, estrelas) vence! Destinado a todos os tipos de público, Just Dance é o jogo perfeito para reuniões de família e festas! <span id="Which_game_was_the_last_one_released?"></span> ===== Qual foi o último jogo lançado? ===== Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo. Por isso, os lançamentos anuais agora são pacotes musicais. Alem disso, há o serviço de assinatura, chamado Just Dance+, que permite que os jogadores joguem músicas de versões antigas do jogo, além de algumas exclusivas. O último lançamento foi o Just Dance 2024 Edition. 597b219ed6c9f2ce1038ddce36effe02462e24f7 Translations:Main Page/1/pt-br 1198 4 15 2024-02-09T09:53:55Z Aniceto 2 Created page with "_NOTOC_" wikitext text/x-wiki _NOTOC_ 479d4d7f0a56fc227a36a18b741ec373d2ca597a 33 15 2024-02-09T10:14:18Z Aniceto 2 wikitext text/x-wiki __NOTOC__ b18a2fe9936fb0a95c569446477dd5d283006b59 Translations:Main Page/2/pt-br 1198 5 17 2024-02-09T09:54:40Z Aniceto 2 Created page with "== Seja bem-vindo a {{SITENAME}}! ==" wikitext text/x-wiki == Seja bem-vindo a {{SITENAME}}! == d4e0a8b3fe88cca9454cbc7914751c80b9c59e89 Translations:Main Page/3/pt-br 1198 6 19 2024-02-09T09:56:03Z Aniceto 2 Created page with "Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance"." wikitext text/x-wiki Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". 61b04ecfb02017b604072faed75328145177f231 Translations:Main Page/4/pt-br 1198 7 21 2024-02-09T09:56:33Z Aniceto 2 Created page with "==== Perguntas Frequentes ====" wikitext text/x-wiki ==== Perguntas Frequentes ==== d4d539d5853291ff8beea6266b3c2f95cec4b463 Translations:Main Page/5/pt-br 1198 8 23 2024-02-09T09:57:24Z Aniceto 2 Created page with "===== Sobre o que é o Just Dance? =====" wikitext text/x-wiki ===== Sobre o que é o Just Dance? ===== d4d45455750cd39e4b36ef99d2600f2668d7f6eb Translations:Main Page/7/pt-br 1198 9 25 2024-02-09T10:03:38Z Aniceto 2 Created page with "===== Qual foi o último jogo lançado? =====" wikitext text/x-wiki ===== Qual foi o último jogo lançado? ===== 6a7b9ba560079db338e765f727dd9bfe31ff57de Translations:Main Page/8/pt-br 1198 10 27 2024-02-09T10:05:48Z Aniceto 2 Created page with "Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo, e os lançamentos anuais agora são pacotes musicais, além do serviço de assinatura, chamado Just Dance+. O último lançamento foi o Just Dance 2024 Edition." wikitext text/x-wiki Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo, e os lançamentos anuais agora são pacotes musicais, além do serviço de assinatura, chamado Just Dance+. O último lançamento foi o Just Dance 2024 Edition. ad217caba6bab9eed58390cfd1e2074e4c896595 35 27 2024-02-09T10:18:03Z Aniceto 2 wikitext text/x-wiki Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo. Por isso, os lançamentos anuais agora são pacotes musicais. Alem disso, há o serviço de assinatura, chamado Just Dance+, que permite que os jogadores joguem músicas de versões antigas do jogo, além de algumas exclusivas. O último lançamento foi o Just Dance 2024 Edition. c1c4e3225cf151fb3e92813c3b9d393bcea04b09 Translations:Main Page/6/pt-br 1198 11 29 2024-02-09T10:06:00Z Aniceto 2 Created page with "Começando com o jogo Just Dance, para Wii, em 2009, se tornou uma grande franquia com uma longa lista de versões. No jogo, os jogadores seguem os movimentos de dança dos treinadores na tela, recebendo feedbaks sobre quão bem estão dançando. No modo multijogador, o jogador com mais pontos (e, consequentemente, estrelas) vence! Destinado a todos os tipos de público, Just Dance é o jogo perfeito para reuniões de família e festas!" wikitext text/x-wiki Começando com o jogo Just Dance, para Wii, em 2009, se tornou uma grande franquia com uma longa lista de versões. No jogo, os jogadores seguem os movimentos de dança dos treinadores na tela, recebendo feedbaks sobre quão bem estão dançando. No modo multijogador, o jogador com mais pontos (e, consequentemente, estrelas) vence! Destinado a todos os tipos de público, Just Dance é o jogo perfeito para reuniões de família e festas! 5751ebd753914961dc58f7d0ee29497c870f2b4c Translations:Main Page/Page display title/en 1198 14 59 2024-02-09T10:55:51Z FuzzyBot 5 Importing a new version from external source wikitext text/x-wiki Main Page 29b077bd4b72e57c6500fdd2d77e1a8b60f2816b Translations:Main Page/1/en 1198 15 60 2024-02-09T10:55:51Z FuzzyBot 5 Importing a new version from external source wikitext text/x-wiki == Welcome to {{SITENAME}}! == 59a3703ccdca929fde05aee8e3ca1ece3ad72ec5 Translations:Main Page/2/en 1198 16 61 2024-02-09T10:55:51Z FuzzyBot 5 Importing a new version from external source wikitext text/x-wiki This is a new Wiki about all things related to Ubisoft's original game "Just Dance". 16e69897a8440e1020d2364c973eee30d58464a2 Translations:Main Page/10/en 1198 24 69 2024-02-09T10:55:51Z FuzzyBot 5 Importing a new version from external source wikitext text/x-wiki __NOTOC__ b18a2fe9936fb0a95c569446477dd5d283006b59 Translations:Main Page/3/en 1198 17 62 2024-02-09T10:55:52Z FuzzyBot 5 Importing a new version from external source wikitext text/x-wiki ==== FAQ ==== 83b390ca3f6e0377f1b7e078d777b5cb652cd8b1 Translations:Main Page/4/en 1198 18 63 2024-02-09T10:55:52Z FuzzyBot 5 Importing a new version from external source wikitext text/x-wiki ===== What is Just Dance about? ===== 4cfc2fe9750bc2484ca144dbb7c7deb809c7cac9 Translations:Main Page/5/en 1198 19 64 2024-02-09T10:55:52Z FuzzyBot 5 Importing a new version from external source wikitext text/x-wiki Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! 493104174f1da107b21d3a7faecfb4828ffd58f8 Translations:Main Page/6/en 1198 20 65 2024-02-09T10:55:52Z FuzzyBot 5 Importing a new version from external source wikitext text/x-wiki ===== Which game was the last one released? ===== d24c9586206fd90b72c6cfda13a6b62d9ba8e8c2 Translations:Main Page/7/en 1198 21 66 2024-02-09T10:55:52Z FuzzyBot 5 Importing a new version from external source wikitext text/x-wiki Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs. Because of that, the yearly iterations are now song packs. Also, theres a subscription-based service, named Just Dance+, thats lets players dance to songs from old versions of the game, as well as some exclusive ones. The latest release was Just Dance 2024 Edition. 13272b1fad0bfc95d19422e7faa2b63abdbdc505 Translations:Main Page/8/en 1198 22 67 2024-02-09T10:55:52Z FuzzyBot 5 Importing a new version from external source wikitext text/x-wiki ===== Which is the current Just Dance+ Season? a79922a0455f3f48338173d6759115e6b56758fc Translations:Main Page/9/en 1198 25 70 2024-02-09T10:55:52Z FuzzyBot 5 Importing a new version from external source wikitext text/x-wiki The current Just Dance+ Season is the 1st of this year's edition, titled Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. 5f90e7088b03cd6a551d40113d792f32a56b7609 Main Page/en 0 23 68 2024-02-09T10:55:54Z FuzzyBot 5 Updating to match new version of source page wikitext text/x-wiki <languages/> <div lang="en" dir="ltr" class="mw-content-ltr"> __NOTOC__ </div> <div lang="en" dir="ltr" class="mw-content-ltr"> == Welcome to {{SITENAME}}! == </div> <div lang="en" dir="ltr" class="mw-content-ltr"> This is a new Wiki about all things related to Ubisoft's original game "Just Dance". </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ==== FAQ ==== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===== What is Just Dance about? ===== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===== Which game was the last one released? ===== </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs. Because of that, the yearly iterations are now song packs. Also, theres a subscription-based service, named Just Dance+, thats lets players dance to songs from old versions of the game, as well as some exclusive ones. The latest release was Just Dance 2024 Edition. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===== Which is the current Just Dance+ Season? </div> <div lang="en" dir="ltr" class="mw-content-ltr"> The current Just Dance+ Season is the 1st of this year's edition, titled Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. </div> 107707967235296fb0a567403bf3bd17cbbb307a Translations:Main Page/1/pt-br 1198 4 39 33 2024-02-09T10:56:36Z Aniceto 2 wikitext text/x-wiki == Seja bem-vindo a {{SITENAME}}! == d4e0a8b3fe88cca9454cbc7914751c80b9c59e89 Main Page/pt-br 0 3 40 36 2024-02-09T10:56:40Z Aniceto 2 wikitext text/x-wiki <languages/> <div lang="en" dir="ltr" class="mw-content-ltr"> __NOTOC__ </div> <span id="Welcome_to_{{SITENAME}}!"></span> == Seja bem-vindo a {{SITENAME}}! == <div class="mw-translate-fuzzy"> == Seja bem-vindo a {{SITENAME}}! == </div> <span id="FAQ"></span> <div class="mw-translate-fuzzy"> Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". </div> <span id="What_is_Just_Dance_about?"></span> <div class="mw-translate-fuzzy"> ==== Perguntas Frequentes ==== </div> <div class="mw-translate-fuzzy"> ===== Sobre o que é o Just Dance? ===== </div> <span id="Which_game_was_the_last_one_released?"></span> <div class="mw-translate-fuzzy"> Começando com o jogo Just Dance, para Wii, em 2009, se tornou uma grande franquia com uma longa lista de versões. No jogo, os jogadores seguem os movimentos de dança dos treinadores na tela, recebendo feedbaks sobre quão bem estão dançando. No modo multijogador, o jogador com mais pontos (e, consequentemente, estrelas) vence! Destinado a todos os tipos de público, Just Dance é o jogo perfeito para reuniões de família e festas! </div> <div class="mw-translate-fuzzy"> ===== Qual foi o último jogo lançado? ===== </div> <div class="mw-translate-fuzzy"> Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo. Por isso, os lançamentos anuais agora são pacotes musicais. Alem disso, há o serviço de assinatura, chamado Just Dance+, que permite que os jogadores joguem músicas de versões antigas do jogo, além de algumas exclusivas. O último lançamento foi o Just Dance 2024 Edition. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> The current Just Dance+ Season is the 1st of this year's edition, titled Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. </div> 7ab26035f6d1fd83435eb3f82075f9c03b5972bc 42 40 2024-02-09T10:56:55Z Aniceto 2 wikitext text/x-wiki <languages/> <div lang="en" dir="ltr" class="mw-content-ltr"> __NOTOC__ </div> <span id="Welcome_to_{{SITENAME}}!"></span> == Seja bem-vindo a {{SITENAME}}! == Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". <span id="FAQ"></span> <div class="mw-translate-fuzzy"> Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". </div> <span id="What_is_Just_Dance_about?"></span> <div class="mw-translate-fuzzy"> ==== Perguntas Frequentes ==== </div> <div class="mw-translate-fuzzy"> ===== Sobre o que é o Just Dance? ===== </div> <span id="Which_game_was_the_last_one_released?"></span> <div class="mw-translate-fuzzy"> Começando com o jogo Just Dance, para Wii, em 2009, se tornou uma grande franquia com uma longa lista de versões. No jogo, os jogadores seguem os movimentos de dança dos treinadores na tela, recebendo feedbaks sobre quão bem estão dançando. No modo multijogador, o jogador com mais pontos (e, consequentemente, estrelas) vence! Destinado a todos os tipos de público, Just Dance é o jogo perfeito para reuniões de família e festas! </div> <div class="mw-translate-fuzzy"> ===== Qual foi o último jogo lançado? ===== </div> <div class="mw-translate-fuzzy"> Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo. Por isso, os lançamentos anuais agora são pacotes musicais. Alem disso, há o serviço de assinatura, chamado Just Dance+, que permite que os jogadores joguem músicas de versões antigas do jogo, além de algumas exclusivas. O último lançamento foi o Just Dance 2024 Edition. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> The current Just Dance+ Season is the 1st of this year's edition, titled Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. </div> bab57f627a76a1681aa245f81ca74696dcd05f33 44 42 2024-02-09T10:57:22Z Aniceto 2 wikitext text/x-wiki <languages/> <div lang="en" dir="ltr" class="mw-content-ltr"> __NOTOC__ </div> <span id="Welcome_to_{{SITENAME}}!"></span> == Seja bem-vindo a {{SITENAME}}! == Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". <span id="FAQ"></span> ==== Perguntas Frequentes ==== <span id="What_is_Just_Dance_about?"></span> <div class="mw-translate-fuzzy"> ==== Perguntas Frequentes ==== </div> <div class="mw-translate-fuzzy"> ===== Sobre o que é o Just Dance? ===== </div> <span id="Which_game_was_the_last_one_released?"></span> <div class="mw-translate-fuzzy"> Começando com o jogo Just Dance, para Wii, em 2009, se tornou uma grande franquia com uma longa lista de versões. No jogo, os jogadores seguem os movimentos de dança dos treinadores na tela, recebendo feedbaks sobre quão bem estão dançando. No modo multijogador, o jogador com mais pontos (e, consequentemente, estrelas) vence! Destinado a todos os tipos de público, Just Dance é o jogo perfeito para reuniões de família e festas! </div> <div class="mw-translate-fuzzy"> ===== Qual foi o último jogo lançado? ===== </div> <div class="mw-translate-fuzzy"> Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo. Por isso, os lançamentos anuais agora são pacotes musicais. Alem disso, há o serviço de assinatura, chamado Just Dance+, que permite que os jogadores joguem músicas de versões antigas do jogo, além de algumas exclusivas. O último lançamento foi o Just Dance 2024 Edition. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> The current Just Dance+ Season is the 1st of this year's edition, titled Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. </div> d9e9b02ba02e73c063c6d07f2665bbf574d82a83 46 44 2024-02-09T10:57:37Z Aniceto 2 wikitext text/x-wiki <languages/> <div lang="en" dir="ltr" class="mw-content-ltr"> __NOTOC__ </div> <span id="Welcome_to_{{SITENAME}}!"></span> == Seja bem-vindo a {{SITENAME}}! == Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". <span id="FAQ"></span> ==== Perguntas Frequentes ==== <span id="What_is_Just_Dance_about?"></span> ===== Sobre o que é o Just Dance? ===== <div class="mw-translate-fuzzy"> ===== Sobre o que é o Just Dance? ===== </div> <span id="Which_game_was_the_last_one_released?"></span> <div class="mw-translate-fuzzy"> Começando com o jogo Just Dance, para Wii, em 2009, se tornou uma grande franquia com uma longa lista de versões. No jogo, os jogadores seguem os movimentos de dança dos treinadores na tela, recebendo feedbaks sobre quão bem estão dançando. No modo multijogador, o jogador com mais pontos (e, consequentemente, estrelas) vence! Destinado a todos os tipos de público, Just Dance é o jogo perfeito para reuniões de família e festas! </div> <div class="mw-translate-fuzzy"> ===== Qual foi o último jogo lançado? ===== </div> <div class="mw-translate-fuzzy"> Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo. Por isso, os lançamentos anuais agora são pacotes musicais. Alem disso, há o serviço de assinatura, chamado Just Dance+, que permite que os jogadores joguem músicas de versões antigas do jogo, além de algumas exclusivas. O último lançamento foi o Just Dance 2024 Edition. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> The current Just Dance+ Season is the 1st of this year's edition, titled Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. </div> 02153936643124eabbeae7c90547fa83fc71d1da 48 46 2024-02-09T10:57:46Z Aniceto 2 wikitext text/x-wiki <languages/> <div lang="en" dir="ltr" class="mw-content-ltr"> __NOTOC__ </div> <span id="Welcome_to_{{SITENAME}}!"></span> == Seja bem-vindo a {{SITENAME}}! == Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". <span id="FAQ"></span> ==== Perguntas Frequentes ==== <span id="What_is_Just_Dance_about?"></span> ===== Sobre o que é o Just Dance? ===== Começando com o jogo Just Dance, para Wii, em 2009, se tornou uma grande franquia com uma longa lista de versões. No jogo, os jogadores seguem os movimentos de dança dos treinadores na tela, recebendo feedbaks sobre quão bem estão dançando. No modo multijogador, o jogador com mais pontos (e, consequentemente, estrelas) vence! Destinado a todos os tipos de público, Just Dance é o jogo perfeito para reuniões de família e festas! <span id="Which_game_was_the_last_one_released?"></span> <div class="mw-translate-fuzzy"> Começando com o jogo Just Dance, para Wii, em 2009, se tornou uma grande franquia com uma longa lista de versões. No jogo, os jogadores seguem os movimentos de dança dos treinadores na tela, recebendo feedbaks sobre quão bem estão dançando. No modo multijogador, o jogador com mais pontos (e, consequentemente, estrelas) vence! Destinado a todos os tipos de público, Just Dance é o jogo perfeito para reuniões de família e festas! </div> <div class="mw-translate-fuzzy"> ===== Qual foi o último jogo lançado? ===== </div> <div class="mw-translate-fuzzy"> Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo. Por isso, os lançamentos anuais agora são pacotes musicais. Alem disso, há o serviço de assinatura, chamado Just Dance+, que permite que os jogadores joguem músicas de versões antigas do jogo, além de algumas exclusivas. O último lançamento foi o Just Dance 2024 Edition. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> The current Just Dance+ Season is the 1st of this year's edition, titled Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. </div> 33135c8e4be609767d4debffac78001eb76c6ca8 50 48 2024-02-09T10:57:56Z Aniceto 2 wikitext text/x-wiki <languages/> <div lang="en" dir="ltr" class="mw-content-ltr"> __NOTOC__ </div> <span id="Welcome_to_{{SITENAME}}!"></span> == Seja bem-vindo a {{SITENAME}}! == Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". <span id="FAQ"></span> ==== Perguntas Frequentes ==== <span id="What_is_Just_Dance_about?"></span> ===== Sobre o que é o Just Dance? ===== Começando com o jogo Just Dance, para Wii, em 2009, se tornou uma grande franquia com uma longa lista de versões. No jogo, os jogadores seguem os movimentos de dança dos treinadores na tela, recebendo feedbaks sobre quão bem estão dançando. No modo multijogador, o jogador com mais pontos (e, consequentemente, estrelas) vence! Destinado a todos os tipos de público, Just Dance é o jogo perfeito para reuniões de família e festas! <span id="Which_game_was_the_last_one_released?"></span> ===== Qual foi o último jogo lançado? ===== <div class="mw-translate-fuzzy"> ===== Qual foi o último jogo lançado? ===== </div> <div class="mw-translate-fuzzy"> Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo. Por isso, os lançamentos anuais agora são pacotes musicais. Alem disso, há o serviço de assinatura, chamado Just Dance+, que permite que os jogadores joguem músicas de versões antigas do jogo, além de algumas exclusivas. O último lançamento foi o Just Dance 2024 Edition. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> The current Just Dance+ Season is the 1st of this year's edition, titled Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. </div> 868728e4d8ead6f26a2ac0eef6d89ffd8441ce1a 52 50 2024-02-09T10:58:39Z Aniceto 2 wikitext text/x-wiki <languages/> <div lang="en" dir="ltr" class="mw-content-ltr"> __NOTOC__ </div> <span id="Welcome_to_{{SITENAME}}!"></span> == Seja bem-vindo a {{SITENAME}}! == Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". <span id="FAQ"></span> ==== Perguntas Frequentes ==== <span id="What_is_Just_Dance_about?"></span> ===== Sobre o que é o Just Dance? ===== Começando com o jogo Just Dance, para Wii, em 2009, se tornou uma grande franquia com uma longa lista de versões. No jogo, os jogadores seguem os movimentos de dança dos treinadores na tela, recebendo feedbaks sobre quão bem estão dançando. No modo multijogador, o jogador com mais pontos (e, consequentemente, estrelas) vence! Destinado a todos os tipos de público, Just Dance é o jogo perfeito para reuniões de família e festas! <span id="Which_game_was_the_last_one_released?"></span> ===== Qual foi o último jogo lançado? ===== Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo. Por isso, os lançamentos anuais agora são pacotes musicais. Alem disso, há o serviço de assinatura, chamado Just Dance+, que permite que os jogadores joguem músicas de versões antigas do jogo, além de algumas exclusivas. O último lançamento foi o Just Dance 2024 Edition. <div class="mw-translate-fuzzy"> Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo. Por isso, os lançamentos anuais agora são pacotes musicais. Alem disso, há o serviço de assinatura, chamado Just Dance+, que permite que os jogadores joguem músicas de versões antigas do jogo, além de algumas exclusivas. O último lançamento foi o Just Dance 2024 Edition. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> The current Just Dance+ Season is the 1st of this year's edition, titled Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. </div> 09ea1ce9b02341db9f626877bcf2e39914f7be31 54 52 2024-02-09T10:59:07Z Aniceto 2 wikitext text/x-wiki <languages/> <div lang="en" dir="ltr" class="mw-content-ltr"> __NOTOC__ </div> <span id="Welcome_to_{{SITENAME}}!"></span> == Seja bem-vindo a {{SITENAME}}! == Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". <span id="FAQ"></span> ==== Perguntas Frequentes ==== <span id="What_is_Just_Dance_about?"></span> ===== Sobre o que é o Just Dance? ===== Começando com o jogo Just Dance, para Wii, em 2009, se tornou uma grande franquia com uma longa lista de versões. No jogo, os jogadores seguem os movimentos de dança dos treinadores na tela, recebendo feedbaks sobre quão bem estão dançando. No modo multijogador, o jogador com mais pontos (e, consequentemente, estrelas) vence! Destinado a todos os tipos de público, Just Dance é o jogo perfeito para reuniões de família e festas! <span id="Which_game_was_the_last_one_released?"></span> ===== Qual foi o último jogo lançado? ===== Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo. Por isso, os lançamentos anuais agora são pacotes musicais. Alem disso, há o serviço de assinatura, chamado Just Dance+, que permite que os jogadores joguem músicas de versões antigas do jogo, além de algumas exclusivas. O último lançamento foi o Just Dance 2024 Edition. ===== Qual é a Temporada atual do Just Dance+? ===== <div lang="en" dir="ltr" class="mw-content-ltr"> The current Just Dance+ Season is the 1st of this year's edition, titled Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. </div> 9acb2e0646f7fadd6e6db57a75807f6a4c41fe12 56 54 2024-02-09T11:05:57Z Aniceto 2 Created page with "A atual Temporada do Just Dance+ é a 1ª da edição desse ano, sob o nome de Disney Magical Time. Iniciado em 12 de Dezembro de 2023, o evento termina em 20 de Fevereiro de 2024." wikitext text/x-wiki <languages/> <div lang="en" dir="ltr" class="mw-content-ltr"> __NOTOC__ </div> <span id="Welcome_to_{{SITENAME}}!"></span> == Seja bem-vindo a {{SITENAME}}! == Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". <span id="FAQ"></span> ==== Perguntas Frequentes ==== <span id="What_is_Just_Dance_about?"></span> ===== Sobre o que é o Just Dance? ===== Começando com o jogo Just Dance, para Wii, em 2009, se tornou uma grande franquia com uma longa lista de versões. No jogo, os jogadores seguem os movimentos de dança dos treinadores na tela, recebendo feedbaks sobre quão bem estão dançando. No modo multijogador, o jogador com mais pontos (e, consequentemente, estrelas) vence! Destinado a todos os tipos de público, Just Dance é o jogo perfeito para reuniões de família e festas! <span id="Which_game_was_the_last_one_released?"></span> ===== Qual foi o último jogo lançado? ===== Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo. Por isso, os lançamentos anuais agora são pacotes musicais. Alem disso, há o serviço de assinatura, chamado Just Dance+, que permite que os jogadores joguem músicas de versões antigas do jogo, além de algumas exclusivas. O último lançamento foi o Just Dance 2024 Edition. ===== Qual é a Temporada atual do Just Dance+? ===== A atual Temporada do Just Dance+ é a 1ª da edição desse ano, sob o nome de Disney Magical Time. Iniciado em 12 de Dezembro de 2023, o evento termina em 20 de Fevereiro de 2024. 68e86f5806663bb5c75a802edd5e568b9505fed6 58 56 2024-02-09T11:06:34Z Aniceto 2 Created page with "__NOTOC__" wikitext text/x-wiki <languages/> __NOTOC__ <span id="Welcome_to_{{SITENAME}}!"></span> == Seja bem-vindo a {{SITENAME}}! == Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". <span id="FAQ"></span> ==== Perguntas Frequentes ==== <span id="What_is_Just_Dance_about?"></span> ===== Sobre o que é o Just Dance? ===== Começando com o jogo Just Dance, para Wii, em 2009, se tornou uma grande franquia com uma longa lista de versões. No jogo, os jogadores seguem os movimentos de dança dos treinadores na tela, recebendo feedbaks sobre quão bem estão dançando. No modo multijogador, o jogador com mais pontos (e, consequentemente, estrelas) vence! Destinado a todos os tipos de público, Just Dance é o jogo perfeito para reuniões de família e festas! <span id="Which_game_was_the_last_one_released?"></span> ===== Qual foi o último jogo lançado? ===== Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo. Por isso, os lançamentos anuais agora são pacotes musicais. Alem disso, há o serviço de assinatura, chamado Just Dance+, que permite que os jogadores joguem músicas de versões antigas do jogo, além de algumas exclusivas. O último lançamento foi o Just Dance 2024 Edition. ===== Qual é a Temporada atual do Just Dance+? ===== A atual Temporada do Just Dance+ é a 1ª da edição desse ano, sob o nome de Disney Magical Time. Iniciado em 12 de Dezembro de 2023, o evento termina em 20 de Fevereiro de 2024. 5f253afdaa9c5d7398b95f45c0f0c9223b081d3b 74 58 2024-02-09T11:27:40Z Aniceto 2 wikitext text/x-wiki <languages/> __NOTOC__ <span id="Welcome_to_{{SITENAME}}!"></span> == Seja bem-vindo a {{SITENAME}}! == Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". <span id="FAQ"></span> ==== Perguntas Frequentes ==== <span id="What_is_Just_Dance_about?"></span> ===== Sobre o que é o Just Dance? ===== Começando com o jogo Just Dance, para Wii, em 2009, se tornou uma grande franquia com uma longa lista de versões. No jogo, os jogadores seguem os movimentos de dança dos treinadores na tela, recebendo feedbaks sobre quão bem estão dançando. No modo multijogador, o jogador com mais pontos (e, consequentemente, estrelas) vence! Destinado a todos os tipos de público, Just Dance é o jogo perfeito para reuniões de família e festas! <span id="Which_game_was_the_last_one_released?"></span> ===== Qual foi o último jogo lançado? ===== Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo. Por isso, os lançamentos anuais agora são pacotes musicais. Alem disso, há o serviço de assinatura, chamado Just Dance+, que permite que os jogadores joguem músicas de versões antigas do jogo, além de algumas exclusivas. O último lançamento foi o Just Dance 2024 Edition. <span id="Which_is_the_current_Just_Dance+_Season?"></span> ===== Qual é a Temporada atual do Just Dance+? ===== A atual Temporada do Just Dance+ é a 1ª da edição desse ano, sob o nome de Disney Magical Time. Iniciado em 12 de Dezembro de 2023, o evento termina em 20 de Fevereiro de 2024. 25ad4210e3ffe7b6d723059862dd89a5cc9f41f7 Translations:Main Page/2/pt-br 1198 5 41 17 2024-02-09T10:56:50Z Aniceto 2 wikitext text/x-wiki Essa é uma nova wiki sobre todas as coisas relacionadas ao jogo original Ubisoft "Just Dance". 61b04ecfb02017b604072faed75328145177f231 Translations:Main Page/3/pt-br 1198 6 43 19 2024-02-09T10:57:18Z Aniceto 2 wikitext text/x-wiki ==== Perguntas Frequentes ==== d4d539d5853291ff8beea6266b3c2f95cec4b463 Translations:Main Page/4/pt-br 1198 7 45 21 2024-02-09T10:57:34Z Aniceto 2 wikitext text/x-wiki ===== Sobre o que é o Just Dance? ===== d4d45455750cd39e4b36ef99d2600f2668d7f6eb Translations:Main Page/5/pt-br 1198 8 47 23 2024-02-09T10:57:43Z Aniceto 2 wikitext text/x-wiki Começando com o jogo Just Dance, para Wii, em 2009, se tornou uma grande franquia com uma longa lista de versões. No jogo, os jogadores seguem os movimentos de dança dos treinadores na tela, recebendo feedbaks sobre quão bem estão dançando. No modo multijogador, o jogador com mais pontos (e, consequentemente, estrelas) vence! Destinado a todos os tipos de público, Just Dance é o jogo perfeito para reuniões de família e festas! 5751ebd753914961dc58f7d0ee29497c870f2b4c Translations:Main Page/6/pt-br 1198 11 49 29 2024-02-09T10:57:52Z Aniceto 2 wikitext text/x-wiki ===== Qual foi o último jogo lançado? ===== 6a7b9ba560079db338e765f727dd9bfe31ff57de Translations:Main Page/7/pt-br 1198 9 51 25 2024-02-09T10:58:12Z Aniceto 2 wikitext text/x-wiki Desde o Just Dance 2023 Edition, Just Dance é um app gratuito, disponível para Nintendo Switch, Xbox Series S/X e Playstation 5, com algumas músicas demo. Por isso, os lançamentos anuais agora são pacotes musicais. Alem disso, há o serviço de assinatura, chamado Just Dance+, que permite que os jogadores joguem músicas de versões antigas do jogo, além de algumas exclusivas. O último lançamento foi o Just Dance 2024 Edition. c1c4e3225cf151fb3e92813c3b9d393bcea04b09 Translations:Main Page/8/pt-br 1198 10 53 35 2024-02-09T10:58:59Z Aniceto 2 wikitext text/x-wiki ===== Qual é a Temporada atual do Just Dance+? ===== 4c3b7066fa7d460f4aef5918800d1df259f5d946 Translations:Main Page/9/pt-br 1198 12 55 2024-02-09T11:05:52Z Aniceto 2 Created page with "A atual Temporada do Just Dance+ é a 1ª da edição desse ano, sob o nome de Disney Magical Time. Iniciado em 12 de Dezembro de 2023, o evento termina em 20 de Fevereiro de 2024." wikitext text/x-wiki A atual Temporada do Just Dance+ é a 1ª da edição desse ano, sob o nome de Disney Magical Time. Iniciado em 12 de Dezembro de 2023, o evento termina em 20 de Fevereiro de 2024. 52c0b3d660313c410c77d3b3ce9746c7b3b449d2 Translations:Main Page/10/pt-br 1198 13 57 2024-02-09T11:06:28Z Aniceto 2 Created page with "__NOTOC__" wikitext text/x-wiki __NOTOC__ b18a2fe9936fb0a95c569446477dd5d283006b59 Main Page 0 1 71 38 2024-02-09T11:12:27Z Aniceto 2 wikitext text/x-wiki <languages/> <translate> <!--T:10--> __NOTOC__ == Welcome to {{SITENAME}}! == <!--T:1--> <!--T:2--> This is a new Wiki about all things related to Ubisoft's original game "Just Dance". ==== FAQ ==== <!--T:3--> ===== What is Just Dance about? ===== <!--T:4--> <!--T:5--> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! ===== Which game was the last one released? ===== <!--T:6--> <!--T:7--> Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs. Because of that, the yearly iterations are now song packs. Also, theres a subscription-based service, named Just Dance+, thats lets players dance to songs from old versions of the game, as well as some exclusive ones. The latest release was Just Dance 2024 Edition. <!--T:8--> ===== Which is the current Just Dance+ Season? ===== <!--T:9--> The current Just Dance+ Season is the 1st of this year's edition, titled Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. </translate> 9984429dc644011751029e8f58dd3c7034f33ed9 72 71 2024-02-09T11:22:25Z Aniceto 2 Marked this version for translation wikitext text/x-wiki <languages/> <translate> <!--T:10--> __NOTOC__ == Welcome to {{SITENAME}}! == <!--T:1--> <!--T:2--> This is a new Wiki about all things related to Ubisoft's original game "Just Dance". ==== FAQ ==== <!--T:3--> ===== What is Just Dance about? ===== <!--T:4--> <!--T:5--> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! ===== Which game was the last one released? ===== <!--T:6--> <!--T:7--> Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs. Because of that, the yearly iterations are now song packs. Also, theres a subscription-based service, named Just Dance+, thats lets players dance to songs from old versions of the game, as well as some exclusive ones. The latest release was Just Dance 2024 Edition. ===== Which is the current Just Dance+ Season? ===== <!--T:8--> <!--T:9--> The current Just Dance+ Season is the 1st of this year's edition, titled Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. </translate> 86a2a827b6f40370e170b0a02e2c81c8f28199ad 73 72 2024-02-09T11:24:18Z Aniceto 2 wikitext text/x-wiki <languages/> <translate> <!--T:10--> __NOTOC__ == Welcome to {{SITENAME}}! == <!--T:1--> <!--T:2--> This is a new Wiki about all things related to Ubisoft's original game "Just Dance". ==== FAQ ==== <!--T:3--> ===== What is Just Dance about? ===== <!--T:4--> <!--T:5--> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! ===== Which game was the last one released? ===== <!--T:6--> <!--T:7--> Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs. Because of that, the yearly iterations are now song packs. Also, theres a subscription-based service, named Just Dance+, thats lets players dance to songs from old versions of the game, as well as some exclusive ones. The latest release was Just Dance 2024 Edition. ===== Which is the current Just Dance+ Season? ===== <!--T:8--> <!--T:9--> The current Just Dance+ Season is the 1st of this year's edition, under the name of Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. </translate> 0cebc7ed03c157975e64c296f44a54877645ee09 80 73 2024-02-09T14:27:35Z 177.130.140.63 0 wikitext text/x-wiki <languages/> <translate> <!--T:10--> __NOTOC__ == Welcome to {{SITENAME}}! == <!--T:1--> <!--T:2--> This is a new Wiki about all things related to Ubisoft's original game "Just Dance". ==== FAQ ==== <!--T:3--> ===== What is Just Dance about? ===== <!--T:4--> <!--T:5--> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! ===== Which game was the last one released? ===== <!--T:6--> <!--T:7--> Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs. Because of that, the yearly iterations are now song packs. Also, theres a subscription-based service, named Just Dance+, thats lets players dance to songs from old versions of the game, as well as some exclusive ones. The latest release was Just Dance 2024 Edition. ===== Which is the current Just Dance+ Season? ===== <!--T:8--> <!--T:9--> The current Just Dance+ Season is the 1st of this year's edition, under the name of Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. = Test = </translate> e1378c596f27f5334a7201dc0743760bed608001 81 80 2024-02-09T14:30:17Z Aniceto 2 wikitext text/x-wiki <languages/> <translate> <!--T:10--> __NOTOC__ == Welcome to {{SITENAME}}! == <!--T:1--> <!--T:2--> This is a new Wiki about all things related to Ubisoft's original game "Just Dance". ==== FAQ ==== <!--T:3--> ===== What is Just Dance about? ===== <!--T:4--> <!--T:5--> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! ===== Which game was the last one released? ===== <!--T:6--> <!--T:7--> Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs. Because of that, the yearly iterations are now song packs. Also, theres a subscription-based service, named Just Dance+, thats lets players dance to songs from old versions of the game, as well as some exclusive ones. The latest release was Just Dance 2024 Edition. ===== Which is the current Just Dance+ Season? ===== <!--T:8--> <!--T:9--> The current Just Dance+ Season is the 1st of this year's edition, under the name of Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. <big>Welcome to {{SITENAME}}!</big> </translate> 14ecd88c1e433e91e6a57406453b85069a0662cd 82 81 2024-02-09T14:31:23Z Aniceto 2 wikitext text/x-wiki <languages/> <translate> <!--T:10--> __NOTOC__ == Welcome to {{SITENAME}}! == <!--T:1--> <!--T:2--> This is a new Wiki about all things related to Ubisoft's original game "Just Dance". ==== FAQ ==== <!--T:3--> ===== What is Just Dance about? ===== <!--T:4--> <!--T:5--> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! ===== Which game was the last one released? ===== <!--T:6--> <!--T:7--> Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs. Because of that, the yearly iterations are now song packs. Also, theres a subscription-based service, named Just Dance+, thats lets players dance to songs from old versions of the game, as well as some exclusive ones. The latest release was Just Dance 2024 Edition. ===== Which is the current Just Dance+ Season? ===== <!--T:8--> <!--T:9--> The current Just Dance+ Season is the 1st of this year's edition, under the name of Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. </translate> 0cebc7ed03c157975e64c296f44a54877645ee09 83 82 2024-02-09T14:32:18Z Aniceto 2 Protected "[[Main Page]]" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) wikitext text/x-wiki <languages/> <translate> <!--T:10--> __NOTOC__ == Welcome to {{SITENAME}}! == <!--T:1--> <!--T:2--> This is a new Wiki about all things related to Ubisoft's original game "Just Dance". ==== FAQ ==== <!--T:3--> ===== What is Just Dance about? ===== <!--T:4--> <!--T:5--> Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! ===== Which game was the last one released? ===== <!--T:6--> <!--T:7--> Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs. Because of that, the yearly iterations are now song packs. Also, theres a subscription-based service, named Just Dance+, thats lets players dance to songs from old versions of the game, as well as some exclusive ones. The latest release was Just Dance 2024 Edition. ===== Which is the current Just Dance+ Season? ===== <!--T:8--> <!--T:9--> The current Just Dance+ Season is the 1st of this year's edition, under the name of Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. </translate> 0cebc7ed03c157975e64c296f44a54877645ee09 Translations:Main Page/8/en 1198 22 75 67 2024-02-09T11:26:56Z FuzzyBot 5 Importing a new version from external source wikitext text/x-wiki ===== Which is the current Just Dance+ Season? ===== 46d50f8b1202713a507d29e5013d8d46f108b4e1 Translations:Main Page/9/en 1198 25 76 70 2024-02-09T11:26:56Z FuzzyBot 5 Importing a new version from external source wikitext text/x-wiki The current Just Dance+ Season is the 1st of this year's edition, under the name of Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. ecb1915ccbe255586bd4e1e247bca1b5c7bca75a Main Page/en 0 23 77 68 2024-02-09T11:26:58Z FuzzyBot 5 Updating to match new version of source page wikitext text/x-wiki <languages/> __NOTOC__ == Welcome to {{SITENAME}}! == This is a new Wiki about all things related to Ubisoft's original game "Just Dance". ==== FAQ ==== ===== What is Just Dance about? ===== Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! ===== Which game was the last one released? ===== Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs. Because of that, the yearly iterations are now song packs. Also, theres a subscription-based service, named Just Dance+, thats lets players dance to songs from old versions of the game, as well as some exclusive ones. The latest release was Just Dance 2024 Edition. ===== Which is the current Just Dance+ Season? The current Just Dance+ Season is the 1st of this year's edition, titled Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. 1b898cee06f34fd80389a6d0e9d2ad68c38824b0 84 77 2024-02-09T14:32:37Z FuzzyBot 5 Updating to match new version of source page wikitext text/x-wiki <languages/> __NOTOC__ == Welcome to {{SITENAME}}! == This is a new Wiki about all things related to Ubisoft's original game "Just Dance". ==== FAQ ==== ===== What is Just Dance about? ===== Starting with the Just Dance game for Wii, in 2009, it is now a very big franchise with a very long list of iterations. In game, players follow the dance moves from the coaches on the screen, receiving feedbacks about how good they are dancing. In co-op, the player with most points (and, consequently, stars) wins! Meant for every type of public, Just Dance is the perfect game for family reunions and house parties! ===== Which game was the last one released? ===== Since Just Dance 2023 Edition, Just Dance is a free app, available to Nintendo Switch, Xbox Series S/X and Playstation 5, with some demo songs. Because of that, the yearly iterations are now song packs. Also, theres a subscription-based service, named Just Dance+, thats lets players dance to songs from old versions of the game, as well as some exclusive ones. The latest release was Just Dance 2024 Edition. ===== Which is the current Just Dance+ Season? ===== The current Just Dance+ Season is the 1st of this year's edition, under the name of Disney Magical Time. Started on December 12, 2023, the event ends on February 20, 2024. 496c1a7ff50de612507c995ba8350ba7d97ff81a MediaWiki:Citizen-footer-desc 8 26 78 2024-02-09T14:18:41Z Aniceto 2 Created page with "“Quantas e quantas vidas nós já vivemos. Fato é que a próxima vida é sempre a mais importante de toda a nossa história”." wikitext text/x-wiki “Quantas e quantas vidas nós já vivemos. Fato é que a próxima vida é sempre a mais importante de toda a nossa história”. 6083e6d199d7f7196449b1f16a099f87c40345bc MediaWiki:Citizen-footer-tagline 8 27 79 2024-02-09T14:22:53Z Aniceto 2 Created page with "This is a new independent project. It shouldn't be related with any existing wikis." wikitext text/x-wiki This is a new independent project. It shouldn't be related with any existing wikis. db2f8c72417b0052586981d5a1d77bc6a077a2d9 File:Discoball jdc ava.png 6 28 85 2024-02-09T14:43:05Z Aniceto 2 Uploaded a work by Ubisoft Shangai from Just Dance China with UploadWizard wikitext text/x-wiki =={{int:filedesc}}== {{Information |description={{en|1=wiki icon}} |date=2024-02-09 |source=Just Dance China |author=Ubisoft Shangai |permission= |other versions= }} =={{int:license-header}}== {{cc-by-sa-4.0}} 62edba3d21168b3530a42ffa79c4dd807f5b86b4 File:1000032865.svg 6 29 86 2024-02-09T14:55:05Z Aniceto 2 Uploaded a work by ubi shanghai from JDCHN with UploadWizard wikitext text/x-wiki =={{int:filedesc}}== {{Information |description={{en|1=logo wiki}} |date=2024-02-09 |source=JDCHN |author=ubi shanghai |permission= |other versions= }} =={{int:license-header}}== {{cc-by-sa-4.0}} ae3d78b495384b8722007cf9ff61046036861452 File:Discoball jdc ava.ico 6 30 87 2024-02-09T17:14:47Z Aniceto 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 MediaWiki:Common.css 8 31 88 2024-02-09T19:18:06Z Aniceto 2 Created page with "#content { background-color: #203158; }" css text/css #content { background-color: #203158; } 3e36916460d2a5a57603adfd17ad4339c18e6d2b 89 88 2024-02-09T19:18:33Z Aniceto 2 Blanked the page css text/css da39a3ee5e6b4b0d3255bfef95601890afd80709 90 89 2024-02-09T19:19:35Z Aniceto 2 css text/css #content { background-color: #111a37; } 1b6bddcab46bb28d246d16785b3850ac961fb208 91 90 2024-02-09T19:20:50Z Aniceto 2 css text/css #content { background-color: #111a37; } #p-navigation { background-color: #111a37; } db89193f7ba68e2be77db2a1782581cf7916f9a8 92 91 2024-02-09T19:22:11Z Aniceto 2 css text/css #content { background-color: #f3c0dd; } #p-navigation { background-color: #f3c0dd; } e8f935dd6ba64db75ebfb414c1978f6ba3bf04c9 93 92 2024-02-09T19:22:46Z Aniceto 2 css text/css #content { background-color: #182444; } #p-navigation { background-color: #182444; } 04fcabfe4968c8b57a4152f17f528ffe55ec3c83 94 93 2024-02-09T19:30:00Z Aniceto 2 Blanked the page css text/css da39a3ee5e6b4b0d3255bfef95601890afd80709 File:Jd23-logo-horizontal.png 6 32 95 2024-02-09T20:03:33Z Aniceto 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:2024S1BANNER.jpeg 6 34 97 2024-02-10T00:33:20Z Aniceto 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Template:Main page/event 10 35 98 2024-02-10T00:36:44Z Aniceto 2 Created page with "{{#if:{{Main page/settings|eventpage}} |<div class="home-event"> <div class="home-card home-card--button"> <div class="home-card__background">[[File:{{#if:{{Main page/settings|eventimage}}|{{Main page/settings|eventimage}}|Placeholderv2.png}}|1080px|link={{Main page/settings|eventpage}}]]</div> <div class="home-card__foreground"> <div class="home-card__header">{{Main page/settings|eventpage}}</div><!-- ----- Event ----- -->{{#if:{{Main page/settings|eventstarttime}}{{Mai..." wikitext text/x-wiki {{#if:{{Main page/settings|eventpage}} |<div class="home-event"> <div class="home-card home-card--button"> <div class="home-card__background">[[File:{{#if:{{Main page/settings|eventimage}}|{{Main page/settings|eventimage}}|Placeholderv2.png}}|1080px|link={{Main page/settings|eventpage}}]]</div> <div class="home-card__foreground"> <div class="home-card__header">{{Main page/settings|eventpage}}</div><!-- ----- Event ----- -->{{#if:{{Main page/settings|eventstarttime}}{{Main page/settings|eventendtime}} |<div class="home-card__label"><!-- ----------------- Event has started ----------------- -->{{#ifexpr: {{#time:U|now}} > {{#time:U|{{Main page/settings|eventstarttime}}}}<!-- --------------- Event has ended --------------- -->|{{#ifexpr: {{#time:U|now}} > {{#time:U|{{Main page/settings|eventendtime}}}}<!-- -->|Ended<!-- ---------------- Event is ongoing ---------------- -->|Ends in<!-- -->}}<!-- -->{{nbsp}}{{Time ago|{{Main page/settings|eventendtime}}|min_magnitude=hours}}<!-- --------------------- Event has not started --------------------- -->|Starts in {{Time ago|{{Main page/settings|eventstarttime}}|min_magnitude=hours}}<!-- -->}}<!-- --></div><!-- -->}} </div> </div> </div><templatestyles src="Template:Main page/event/styles.css" />}}<noinclude><!-- For preview only --><templatestyles src="Template:Main page/shared/styles.css" />{{/doc}}</noinclude> 9241497a752959a6aee3508e225e5ff6d5162965 Template:Main page/settings 10 36 99 2024-02-10T00:37:03Z Aniceto 2 Created page with "<includeonly>{{#if:{{{1|}}} |{{#switch:{{{1}}} <!-- Configuration starts here --> <!-- Header --> | subtitle = The {{em|ubisoft}} ''[[Just Dance]]'' wiki that {{em|makes you move your body}} since 2023. <!-- Event --> | eventpage = Disney Magical Time | eventimage = 2024S1BANNER.jpeg <!-- See Template:Time ago for acceptable time syntax NOTE: Time needs to be in UTC timezone --> | eventstarttime = 2024-02-08 16:00 | eventendtime = 2024-02-15 16:00 <!-- Featured --> | fe..." wikitext text/x-wiki <includeonly>{{#if:{{{1|}}} |{{#switch:{{{1}}} <!-- Configuration starts here --> <!-- Header --> | subtitle = The {{em|ubisoft}} ''[[Just Dance]]'' wiki that {{em|makes you move your body}} since 2023. <!-- Event --> | eventpage = Disney Magical Time | eventimage = 2024S1BANNER.jpeg <!-- See Template:Time ago for acceptable time syntax NOTE: Time needs to be in UTC timezone --> | eventstarttime = 2024-02-08 16:00 | eventendtime = 2024-02-15 16:00 <!-- Featured --> | featured = Can't Tame Her }}}}</includeonly><noinclude>{{/doc}}</noinclude> 47bb1cf7ab24d36a738d0708de90192bcec9ed8a Template:Main page/settings/doc 10 37 100 2024-02-10T00:37:59Z Aniceto 2 Created page with "{{Documentation}} {{t|Main page/settings}} contains all the configuration for all the main page templates. Please edit this template to update the content on the main page. <includeonly> [[Category:Main page templates]] [[Category:Manual templates]] </includeonly>" wikitext text/x-wiki {{Documentation}} {{t|Main page/settings}} contains all the configuration for all the main page templates. Please edit this template to update the content on the main page. <includeonly> [[Category:Main page templates]] [[Category:Manual templates]] </includeonly> 31d9cc21769ea70d7b01f321a663770531bbdb33 Template:Documentation 10 38 101 2024-02-10T00:39:00Z Aniceto 2 Created page with "{{Documentation}} The '''documentation''' template is transcluded in the template/module documentation. This template should only be used on subpages titled "doc". ==Usage== Place {{t|documentation}} at the top of the documentation page. If the page to be documented is a subpage, use {{t|documentation|pagename of page to be documented}} at the top of the documentation page. For example, Template:Foo/bar's documentation page would use {{t|documentation|Template:Foo/ba..." wikitext text/x-wiki {{Documentation}} The '''documentation''' template is transcluded in the template/module documentation. This template should only be used on subpages titled "doc". ==Usage== Place {{t|documentation}} at the top of the documentation page. If the page to be documented is a subpage, use {{t|documentation|pagename of page to be documented}} at the top of the documentation page. For example, Template:Foo/bar's documentation page would use {{t|documentation|Template:Foo/bar}}. The template will attempt to auto detect and link <code><nowiki>{{#Invoke:}}</nowiki></code> calls on template documentations or the <code>require()</code>/<code>mw.loadData()</code> depedency list on module documentations. If you want to supress the auto generated dependency list, use {{t|documentation|DependencyList=no}} ==Note== This template links to a /doc that may appear useless, however, it exists in order to link navboxes and userboxes to their base template's documentation. <includeonly></includeonly> ==TemplateData== <templatedata> { "params": {}, "description": "The documentation template is transcluded in the template/module documentation. This template should only be used on subpages titled \"doc\"." } </templatedata> ee88cc5426112bf25da22af69ca082675eb8c051 Template:Documentation 10 38 102 101 2024-02-10T00:40:17Z Aniceto 2 wikitext text/x-wiki <includeonly>{{#invoke:Documentation|doc}}__NOEDITSECTION__{{#seo: |type = website |description = {{FULLPAGENAME}} is a template page used on the Just Dance Wiki. Templates are pages that are embedded (transcluded) into other pages to allow for the repetition of information. |site_name = Just Dance Wiki |locale = {{PAGELANGUAGE}} }}</includeonly><noinclude>{{/doc}}</noinclude> 97a6efd9c39824c712cc6be0b10ee2533d1932f0 Template:Documentation/doc 10 39 103 2024-02-10T00:40:33Z Aniceto 2 Created page with "{{Documentation}} The '''documentation''' template is transcluded in the template/module documentation. This template should only be used on subpages titled "doc". ==Usage== Place {{t|documentation}} at the top of the documentation page. If the page to be documented is a subpage, use {{t|documentation|pagename of page to be documented}} at the top of the documentation page. For example, Template:Foo/bar's documentation page would use {{t|documentation|Template:Foo/ba..." wikitext text/x-wiki {{Documentation}} The '''documentation''' template is transcluded in the template/module documentation. This template should only be used on subpages titled "doc". ==Usage== Place {{t|documentation}} at the top of the documentation page. If the page to be documented is a subpage, use {{t|documentation|pagename of page to be documented}} at the top of the documentation page. For example, Template:Foo/bar's documentation page would use {{t|documentation|Template:Foo/bar}}. The template will attempt to auto detect and link <code><nowiki>{{#Invoke:}}</nowiki></code> calls on template documentations or the <code>require()</code>/<code>mw.loadData()</code> depedency list on module documentations. If you want to supress the auto generated dependency list, use {{t|documentation|DependencyList=no}} ==Note== This template links to a /doc that may appear useless, however, it exists in order to link navboxes and userboxes to their base template's documentation. <includeonly></includeonly> ==TemplateData== <templatedata> { "params": {}, "description": "The documentation template is transcluded in the template/module documentation. This template should only be used on subpages titled \"doc\"." } </templatedata> ee88cc5426112bf25da22af69ca082675eb8c051 Template:T 10 40 104 2024-02-10T00:41:22Z Aniceto 2 Created page with "<includeonly><nowiki>{{</nowiki>[[Template:{{{1}}}|{{{1}}}]]{{t/piece|{{{2|---}}}}}{{t/piece|{{{3|---}}}}}{{t/piece|{{{4|---}}}}}{{t/piece|{{{5|---}}}}}{{t/piece|{{{6|---}}}}}{{t/piece|{{{7|---}}}}}{{t/piece|{{{8|---}}}}}{{t/piece|{{{9|---}}}}}{{t/piece|{{{10|---}}}}}{{t/piece|{{{11|---}}}}}{{t/piece|{{{12|---}}}}}{{t/piece|{{{13|---}}}}}{{t/piece|{{{14|---}}}}}{{t/piece|{{{15|---}}}}}{{t/piece|{{{16|---}}}}}{{t/piece|{{{17|---}}}}}{{t/piece|{{{18|---}}}}}{{t/piece|{{{19..." wikitext text/x-wiki <includeonly><nowiki>{{</nowiki>[[Template:{{{1}}}|{{{1}}}]]{{t/piece|{{{2|---}}}}}{{t/piece|{{{3|---}}}}}{{t/piece|{{{4|---}}}}}{{t/piece|{{{5|---}}}}}{{t/piece|{{{6|---}}}}}{{t/piece|{{{7|---}}}}}{{t/piece|{{{8|---}}}}}{{t/piece|{{{9|---}}}}}{{t/piece|{{{10|---}}}}}{{t/piece|{{{11|---}}}}}{{t/piece|{{{12|---}}}}}{{t/piece|{{{13|---}}}}}{{t/piece|{{{14|---}}}}}{{t/piece|{{{15|---}}}}}{{t/piece|{{{16|---}}}}}{{t/piece|{{{17|---}}}}}{{t/piece|{{{18|---}}}}}{{t/piece|{{{19|---}}}}}{{t/piece|{{{20|---}}}}}{{t/piece|{{{21|---}}}}}<nowiki>}}</nowiki></includeonly><noinclude> {{documentation}}</noinclude> 9bbfbb3d891ffa62ccebed3d5790ccf39d59c793 Template:T/doc 10 41 105 2024-02-10T00:41:53Z Aniceto 2 Created page with "{{Documentation}} ;Description :A template link with a variable number of example parameters (0-20), which can be used to show example inputs. :Utilises [[Template:T/piece]]. ;Syntax :{{t|t|parameter1|parameter2|parameter3|parameter4|...|parameter20}} ;Sample code :<code><nowiki>{{t|welcome}}</nowiki></code> gives... :{{t|welcome}} :<code><nowiki>{{t|welcome|Item1|Item2|Item3|Item4|Item5|...}}</nowiki></code> gives... :{{t|welcome|Item1|Item2|Item3|Item4|Item5|...}} ;See..." wikitext text/x-wiki {{Documentation}} ;Description :A template link with a variable number of example parameters (0-20), which can be used to show example inputs. :Utilises [[Template:T/piece]]. ;Syntax :{{t|t|parameter1|parameter2|parameter3|parameter4|...|parameter20}} ;Sample code :<code><nowiki>{{t|welcome}}</nowiki></code> gives... :{{t|welcome}} :<code><nowiki>{{t|welcome|Item1|Item2|Item3|Item4|Item5|...}}</nowiki></code> gives... :{{t|welcome|Item1|Item2|Item3|Item4|Item5|...}} ;See also :[[w:c:wow:Template:T|Template:T]] on WoWWiki <includeonly>[[Category:Internal link templates|{{PAGENAME}}]]</includeonly><noinclude></noinclude> 5a0161a972549a29a665adc8225d920f4bd1a256 Template:T/piece 10 42 106 2024-02-10T00:43:26Z Aniceto 2 Created page with "{{#ifeq: {{{1|---}}}|---||&#124;<font color="gray">''&lt;{{{1}}}&gt;''</font>}}<noinclude> {{/doc}}</noinclude>" wikitext text/x-wiki {{#ifeq: {{{1|---}}}|---||&#124;<font color="gray">''&lt;{{{1}}}&gt;''</font>}}<noinclude> {{/doc}}</noinclude> 2ddf7df2334b2a1624bf213ade67ba6b68296e86 Template:Main page/shared/styles.css 10 44 108 2024-02-10T00:46:08Z Aniceto 2 Created page with ".home-grid { display: grid; grid: auto-flow dense/repeat( auto-fit, minmax( 9.375rem, 1fr ) ); grid-auto-rows: minmax( 3rem, auto ); grid-gap: var( --space-xs ); } .home-grid--col2 { grid-template-columns: 1fr 1fr; } .home-grid a.external { background-image: none; } .home-card { position: relative; padding: var( --space-md ); background: var( --color-surface-1 ); border: 1px solid var( --border-color-base ); border-radius: 8px; box-shadow: 0 3px 6px rgba(..." wikitext text/x-wiki .home-grid { display: grid; grid: auto-flow dense/repeat( auto-fit, minmax( 9.375rem, 1fr ) ); grid-auto-rows: minmax( 3rem, auto ); grid-gap: var( --space-xs ); } .home-grid--col2 { grid-template-columns: 1fr 1fr; } .home-grid a.external { background-image: none; } .home-card { position: relative; padding: var( --space-md ); background: var( --color-surface-1 ); border: 1px solid var( --border-color-base ); border-radius: 8px; box-shadow: 0 3px 6px rgba( 0, 0, 0, 0.04 ), 0 3px 6px rgba( 0, 0, 0, 0.0575 ); font-size: 0.875rem; } .home-card table.timeline { margin-top: 0.2rem; } .home-card--col2 { grid-column: span 2; } .home-card--row3 { grid-row: span 3; } .home-card--row4 { grid-row: span 4; } .home-card--row8 { grid-row: span 8 / auto; } .home-card__label { color: var( --color-base--subtle ); font-size: 0.8125rem; letter-spacing: 0.75px; } .home-card__header { color: var( --color-base--emphasized ); font-size: 1rem; font-weight: var( --font-weight-semibold ); line-height: var( --line-height-xs ); } .home-card__header a { display: flex; align-items: center; justify-content: space-between; } .home-card__header a:after { content: '▶'; font-size: 0.8125rem; } .home-card__background { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: #242a31; border-radius: 8px; } .home-card__background:after { position: absolute; pointer-events: none; top: 0; bottom: 0; left: 0; right: 0; display: block; background: linear-gradient(to right,#000,transparent); content: ""; } .home-card__background picture, .home-card__background img { width: 100%; height: 100%; } .home-card__background img { object-fit: cover; object-position: center; } .home-card__foreground { position: absolute; top: 0; bottom: 0; left: 0; right: 0; padding: var( --space-md ); display: flex; flex-direction: column; justify-content: center; gap: var( --space-xxs ); color: #fff; line-height: var( --line-height-xs ); pointer-events: none; } .home-card__foreground .home-card__header { color: #fff; } .home-card__foreground .home-card__label { color: #bababa; } .home-card p { margin-top: var( --space-xs ); font-size: 0.875rem; } .home-card.home-card--button { overflow: hidden; padding: 0; background: #242a31; border: 0; } .home-card--button a { display: flex; height: 100%; justify-content: center; align-items: center; padding: 0 var( --space-md ); background: transparent; color: #fff; font-weight: 500; } .home-card--button .home-card__background a { padding: 0; } .home-card--button img { transition: transform 0.2s ease; } .home-card--button:hover img { transform: scale(1.1); } .home-link { display: grid; margin-top: var( --space-xs ); font-size: 0.875rem; font-weight: 500; grid-gap: var( --space-xs ); text-align: center; } .home-link__button { display: flex; } .home-link__button a { flex-grow: 1; padding: var( --space-xs ); border: 1px solid var( --border-color-base ); background: var( --color-surface-2 ); border-radius: var( --border-radius--medium ); color: var( --color-base--emphasized ) !important; line-height: var( --line-height-xs ); text-decoration: none !important; } .home-link__button a:hover { background: var( --color-surface-2--hover ); } .home-link__button a:active { background: var( --color-surface-2--active ); } #home-content { margin-top: var( --space-lg ); } .home-card .template-statsbar { margin: 0; } #home-card-discord { background: #5865f2; } #home-card-patreon { background: #ff424d; } #home-card-kofi { background: #ff5e5b; } #home-card-reddit { background: #ff4500; } .home-footer { font-size: 0.8125rem; font-family: monospace; text-align: center; } 23a24a32b64233ba91a4f73f811fa062f79d788b Template:Main page/event/doc 10 45 109 2024-02-10T00:49:03Z Aniceto 2 Created page with "{{Documentation}} This template is used on the [[Just Dance Wiki|main page]]. It is the event card in the content section. You can update the content by editing the [[Template:Main page/settings|main page settings]]. <includeonly>[[Category:Main page templates|{{PAGENAME}}]]</includeonly>" wikitext text/x-wiki {{Documentation}} This template is used on the [[Just Dance Wiki|main page]]. It is the event card in the content section. You can update the content by editing the [[Template:Main page/settings|main page settings]]. <includeonly>[[Category:Main page templates|{{PAGENAME}}]]</includeonly> 75c8c21fdc37b6d40129c4b5027f82ee327fad02 Module:Documentation 828 46 110 2024-02-10T00:50:18Z Aniceto 2 Created page with "-- <nowiki> local dependencyList = require( 'Module:DependencyList' ) local yn = require( 'Module:Yesno' ) local hatnote = require( 'Module:Hatnote' )._hatnote local mbox = require( 'Module:Mbox' )._mbox local lang = mw.getContentLanguage() local p = {} function p.doc( frame ) local title = mw.title.getCurrentTitle() local args = frame:getParent().args local page = args[1] or mw.ustring.gsub( title.fullText, '/doc$', '' ) local ret, cats, ret1, ret2, ret..." Scribunto text/plain -- <nowiki> local dependencyList = require( 'Module:DependencyList' ) local yn = require( 'Module:Yesno' ) local hatnote = require( 'Module:Hatnote' )._hatnote local mbox = require( 'Module:Mbox' )._mbox local lang = mw.getContentLanguage() local p = {} function p.doc( frame ) local title = mw.title.getCurrentTitle() local args = frame:getParent().args local page = args[1] or mw.ustring.gsub( title.fullText, '/doc$', '' ) local ret, cats, ret1, ret2, ret3 local pageType = title.namespace == 828 and 'module' or 'template' local opts = frame.args; -- subpage header if title.subpageText == 'doc' then ret = mbox( 'This is a documentation subpage for ' .. page .. '.', string.format( 'It contains usage information, categories, and other content that is not part of the [[' .. page .. '|original %s page]].', pageType ), { icon = 'WikimediaUI-Notice.svg' } ) if title.namespace == 10 then -- Template namespace cats = '[[Category:Template documentation|' .. title.baseText .. ']]' ret2 = dependencyList._main() elseif title.namespace == 828 then -- Module namespace cats = '[[Category:Module documentation|' .. title.baseText .. ']]' ret2 = dependencyList._main() ret2 = ret2 .. require('Module:Module toc').main() else cats = '' ret2 = '' end return tostring( ret ) .. ret2 .. cats end -- template header -- don't use mw.html as we aren't closing the main div tag ret1 = '<div class="documentation">' ret2 = mw.html.create( nil ) :tag( 'div' ) :addClass( 'documentation-header' ) :tag( 'span' ) :addClass( 'documentation-title' ) :wikitext( lang:ucfirst( string.format('%s documentation', pageType) ) ) :done() :tag( 'span' ) :addClass( 'documentation-links plainlinks' ) :wikitext( '[[' .. tostring( mw.uri.fullUrl( page .. '/doc', {action='view'} ) ) .. ' view]]' .. '[[' .. tostring( mw.uri.fullUrl( page .. '/doc', {action='edit'} ) ) .. ' edit]]' .. '[[' .. tostring( mw.uri.fullUrl( page .. '/doc', {action='history'} ) ) .. ' history]]' .. '[<span class="jsPurgeLink">[' .. tostring( mw.uri.fullUrl( title.fullText, {action='purge'} ) ) .. ' purge]</span>]' ) :done() :done() :tag( 'div' ) :addClass( 'documentation-subheader' ) :tag( 'span' ) :addClass( 'documentation-documentation' ) :wikitext( 'This documentation is transcluded from [[' .. page .. '/doc]]. Changes can be proposed in the talk page.' ) :done() :wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = 'Documentation/styles.css'} }) :done() ret3 = {} if args.scwShared then --- Message box table.insert( ret3, mbox( string.format( "'''%s''' is [%s%s shared across] the Star Citizen Wikis.", title.fullText, 'https://github.com/The-Star-Citizen-Wikis/SharedModules/tree/master/', mw.uri.encode( title.rootText, 'PATH' ) ), string.format( 'This %s is shared across the Star Citizen Wikis. Any changes should also be relayed to the GitHub repository.', pageType ), { icon = 'WikimediaUI-ArticleDisambiguation-ltr.svg' } ) ) --- Set category table.insert( ret3, string.format( '[[Category:%s shared by the Star Citizen Wikis]]', lang:ucfirst( pageType ) .. 's' ) ) --- Interlanguage link --- TODO: Make this into a for loop when there are more wikis table.insert( ret3, string.format( '[[%s:%s]]', 'de', title.fullText ) ) end if args.fromWikipedia then table.insert( ret3, mbox( string.format( "'''%s''' is imported from [https://en.wikipedia.org/wiki/%s %s] on Wikipedia.", title.fullText, page, page ), string.format( 'This %s is imported from the English Wikipedia. Although the visual appearance might be different, the functionality is identical. Please refer to the Wikipedia page for detailed documentation.', pageType ), { icon = 'WikimediaUI-Logo-Wikipedia.svg' } ) ) --- Set category table.insert( ret3, string.format( '[[Category:%s imported from Wikipedia]]', lang:ucfirst( pageType ) .. 's' ) ) end if title.namespace == 828 then -- Has config if mw.title.new( title.fullText .. '/config.json', 'Module' ).exists then table.insert( ret3, mbox( string.format( "'''%s''' loads configuration from [[%s/config.json]].", title.fullText, title.fullText ), 'This module can be configurated from the config.json subpage.', { icon='WikimediaUI-Settings.svg' } ) ) end -- Has data if mw.title.new( title.fullText .. '/data.json', 'Module' ).exists then table.insert( ret3, mbox( string.format( "'''%s''' loads data from [[%s/data.json]].", title.fullText, title.fullText ), 'This module uses data from the data.json subpage.', { icon='WikimediaUI-Code.svg' } ) ) end -- Has localization if mw.title.new( title.fullText .. '/i18n.json', 'Module' ).exists then table.insert( ret3, mbox( string.format( "'''%s''' loads messages from [[%s/i18n.json]].", title.fullText, title.fullText ), 'This module is designed to be language-neutral. All of the messages are saved in the i18n.json subpage.', { icon='WikimediaUI-Language.svg' } ) ) end -- Testcase page if title.subpageText == 'testcases' then table.insert( ret3, hatnote( string.format( 'This is the test cases page for the module [[Module:%s]].', title.baseText ), { icon='WikimediaUI-LabFlask.svg' } ) ) end end --- Dependency list table.insert( ret3, dependencyList._main( nil, args.category, args.isUsed ) ) -- Has templatestyles if mw.title.new( title.fullText .. '/styles.css' ).exists then table.insert( ret3, hatnote( string.format( "'''%s''' loads styles from [[%s/styles.css]].", title.fullText, title.fullText ), { icon='WikimediaUI-Palette.svg' } ) ) end --- Module stats bar if title.namespace == 828 then table.insert( ret3, '<div class="documentation-modulestats">' ) -- Function list table.insert( ret3, require( 'Module:Module toc' ).main() ) -- Unit tests local testcaseTitle = title.baseText .. '/testcases' if mw.title.new( testcaseTitle, 'Module' ).exists then -- There is probably a better way :P table.insert( ret3, frame:preprocess( '{{#invoke:' .. testcaseTitle .. '|run}}' ) ) end table.insert( ret3, '</div>' ) end return ret1 .. tostring( ret2 ) .. '<div class="documentation-content">' .. table.concat( ret3 ) end return p -- </nowiki> bc5ec27e8ece3f9ce1927d2d9fcb4e470e0815f3 Module:DependencyList 828 47 111 2024-02-10T00:51:29Z Aniceto 2 Created page with "require("strict"); local p = {} local libraryUtil = require( 'libraryUtil' ) local arr = require( 'Module:Array' ) local yn = require( 'Module:Yesno' ) local param = require( 'Module:Paramtest' ) local dpl = require( 'Module:DPLlua' ) local userError = require("Module:User error") local mHatnote = require('Module:Hatnote') local mHatlist = require('Module:Hatnote list') local moduleIsUsed = false local COLLAPSE_LIST_LENGTH_THRESHOLD = 1 local MAX_DYNAMIC_REQUIRE_LIST_LE..." Scribunto text/plain require("strict"); local p = {} local libraryUtil = require( 'libraryUtil' ) local arr = require( 'Module:Array' ) local yn = require( 'Module:Yesno' ) local param = require( 'Module:Paramtest' ) local dpl = require( 'Module:DPLlua' ) local userError = require("Module:User error") local mHatnote = require('Module:Hatnote') local mHatlist = require('Module:Hatnote list') local moduleIsUsed = false local COLLAPSE_LIST_LENGTH_THRESHOLD = 1 local MAX_DYNAMIC_REQUIRE_LIST_LENGTH = 30 local dynamicRequireListQueryCache = {} local builtins = { --[[ ["libraryUtil"] = { link = "mw:Special:MyLanguage/Extension:Scribunto/Lua reference manual#libraryUtil", categories = {}, } ]] ["strict"] = { link = "mw:Special:MyLanguage/Extension:Scribunto/Lua reference manual#strict", categories = { "Strict mode modules" }, }, }; --- Used in case 'require( varName )' is found. Attempts to find a string value stored in 'varName'. ---@param content string The content of the module to search in ---@param varName string ---@return string local function substVarValue( content, varName ) local res = content:match( varName .. '%s*=%s*(%b""%s-%.*)' ) or content:match( varName .. "%s*=%s*(%b''%s-%.*)" ) or '' if res:find( '^(["\'])[Mm]odule:[%S]+%1' ) and not res:find( '%.%.' ) and not res:find( '%%%a' ) then return mw.text.trim( res ) else return '' end end ---@param capture string ---@param content string The content of the module to search in ---@return string local function extractModuleName( capture, content ) capture = capture:gsub( '^%(%s*(.-)%s*%)$', '%1' ) if capture:find( '^(["\']).-%1$' ) then -- Check if it is already a pure string return capture elseif capture:find( '^[%a_][%w_]*$' ) then -- Check if if is a single variable return substVarValue( content, capture ) end return capture end ---@param str string ---@return string local function formatPageName( str ) local name = mw.text.trim(str) :gsub( '^([\'\"])(.-)%1$', function(_, x) return x end ) -- Only remove quotes at start and end of string if both are the same type :gsub( '_', ' ' ) :gsub( '^.', string.upper ) :gsub( ':.', string.upper ) return name end ---@param str string ---@return string local function formatModuleName( str, allowBuiltins ) if allowBuiltins then local name = mw.text.trim(str) -- Only remove quotes at start and end of string if both are the same type :gsub([[^(['"])(.-)%1$]], function(_, x) return x end); local builtin = builtins[name]; if builtin then return builtin.link .. "|" .. name, builtin; end end local module = formatPageName( str ) if not string.find( module, '^[Mm]odule:' ) then module = 'Module:' .. module end return module end local function dualGmatch( str, pat1, pat2 ) local f1 = string.gmatch( str, pat1 ) local f2 = string.gmatch( str, pat2 ) return function() return f1() or f2() end end --- Used in case a construct like 'require( "Module:wowee/" .. isTheBest )' is found. --- Will return a list of pages which satisfy this pattern where 'isTheBest' can take any value. ---@param query string ---@return string[] Sequence of strings local function getDynamicRequireList( query ) local isDynamic = true; if query:find( '%.%.' ) then query = mw.text.split( query, '..', true ) query = arr.map( query, function(x) return mw.text.trim(x) end ) query = arr.map( query, function(x) return (x:match('^[\'\"](.-)[\'\"]$') or '%') end ) query = table.concat( query ) else local _; _, query = query:match( '(["\'])(.-)%1' ) if query == nil then return {}, isDynamic end local replacements; query, replacements = query:gsub( '%%%a', '%%' ) if replacements == 0 then isDynamic = false; end end query = query:gsub( '^[Mm]odule:', '' ) if query:find( '^[Dd]ata/' ) then return { 'Module:' .. query }, isDynamic; -- This format will later be used by formatDynamicQueryLink() end if dynamicRequireListQueryCache[ query ] then return dynamicRequireListQueryCache[ query ], isDynamic; end local list = dpl.ask{ namespace = 'Module', titlematch = query, nottitlematch = '%/doc|'..query..'/%', distinct = 'strict', ignorecase = true, ordermethod = 'title', count = MAX_DYNAMIC_REQUIRE_LIST_LENGTH + 1, skipthispage = 'no', allowcachedresults = true, cacheperiod = 604800 -- One week } if #list > MAX_DYNAMIC_REQUIRE_LIST_LENGTH then list = { 'Module:' .. query } end dynamicRequireListQueryCache[ query ] = list return list, isDynamic; end --- Returns a list of modules loaded and required by module 'moduleName'. ---@param moduleName string ---@param searchForUsedTemplates boolean ---@return string[], string[], string[], string[] local function getRequireList( moduleName, searchForUsedTemplates ) local content = mw.title.new( moduleName ):getContent() local requireList = arr{} local loadDataList = arr{} local usedTemplateList = arr{} local dynamicRequirelist = arr{} local dynamicLoadDataList = arr{} local extraCategories = arr{} assert( content ~= nil, string.format( '%s does not exist', moduleName ) ) content = content:gsub( '%-%-%[(=-)%[.-%]%1%]', '' ):gsub( '%-%-[^\n]*', '' ) -- Strip comments for match in dualGmatch( content, 'require%s*(%b())', 'require%s*((["\'])%s*[Mm]odule:.-%2)' ) do match = mw.text.trim( match ) match = extractModuleName( match, content ) if match:find( '%.%.' ) or match:find( '%%%a' ) then for _, x in ipairs( getDynamicRequireList( match ) ) do table.insert( dynamicRequirelist, x ) end elseif match ~= '' then local builtin; match, builtin = formatModuleName( match, true ) table.insert( requireList, match ) if builtin then local builtinCategories = builtin.categories; if type(builtinCategories) == "table" then for _, x in ipairs(builtinCategories) do table.insert(extraCategories, x); end end end end end for match in dualGmatch( content, 'mw%.loadData%s*(%b())', 'mw%.loadData%s*((["\'])%s*[Mm]odule:.-%2)' ) do match = mw.text.trim( match ) match = extractModuleName( match, content ) if match:find( '%.%.' ) or match:find( '%%%a' ) then for _, x in ipairs( getDynamicRequireList( match ) ) do table.insert( dynamicLoadDataList, x ) end elseif match ~= '' then match = formatModuleName( match, true ) table.insert( loadDataList, match ) end end for match in dualGmatch( content, 'mw%.loadJsonData%s*(%b())', 'mw%.loadJsonData%s*((["\'])%s*[Mm]odule:.-%2)' ) do match = mw.text.trim( match ) match = extractModuleName( match, content ) if match:find( '%.%.' ) or match:find( '%%%a' ) then for _, x in ipairs( getDynamicRequireList( match ) ) do table.insert( dynamicLoadDataList, x ) end elseif match ~= '' then match = formatModuleName( match, true ) table.insert( loadDataList, match ) end end for func, match in string.gmatch( content, 'pcall%s*%(([^,]+),([^%),]+)' ) do func = mw.text.trim( func ) match = mw.text.trim( match ) local dynList, isDynamic; if func == 'require' then dynList, isDynamic = getDynamicRequireList(match); if (isDynamic == false and #dynList == 1) then table.insert(requireList, dynList[1]); else for _, x in ipairs(dynList) do table.insert( dynamicRequirelist, x ) end end elseif func == 'mw.loadData' then dynList, isDynamic = getDynamicRequireList(match); if (isDynamic == false and #dynList == 1) then table.insert(loadDataList, dynList[1]); else for _, x in ipairs(dynList) do table.insert( dynamicLoadDataList, x ) end end end end if searchForUsedTemplates then for preprocess in string.gmatch( content, ':preprocess%s*(%b())' ) do local function recursiveGMatch( str, pat ) local list = {} local i = 0 repeat for match in string.gmatch( list[i] or str, pat ) do table.insert( list, match ) end i = i + 1 until i > #list or i > 100 i = 0 return function() i = i + 1 return list[i] end end for template in recursiveGMatch( preprocess, '{(%b{})}' ) do local name = string.match( template, '{(.-)[|{}]' ) if name ~= '' then if name:find( ':' ) then local ns = name:match( '^(.-):' ) if arr.contains( {'', 'template', 'user'}, ns:lower() ) then table.insert( usedTemplateList, name ) elseif ns == ns:upper() then table.insert( usedTemplateList, ns ) -- Probably a magic word end else if name:match( '^%u+$' ) or name == '!' then table.insert( usedTemplateList, name ) -- Probably a magic word else table.insert( usedTemplateList, 'Template:'..name ) end end end end end end requireList = requireList .. dynamicRequirelist:reject( loadDataList ) requireList = requireList:unique() loadDataList = loadDataList .. dynamicLoadDataList:reject( requireList ) loadDataList = loadDataList:unique() usedTemplateList = usedTemplateList:unique() extraCategories = extraCategories:unique() table.sort( requireList ) table.sort( loadDataList ) table.sort( usedTemplateList ) table.sort( extraCategories ) return requireList, loadDataList, usedTemplateList, extraCategories end --- Returns a list with module and function names used in all '{{#Invoke:moduleName|funcName}}' found on page 'templateName'. ---@param templateName string ---@return table<string, string>[] local function getInvokeCallList( templateName ) local content = mw.title.new( templateName ):getContent() local invokeList = {} assert( content ~= nil, string.format( '%s does not exist', templateName ) ) for moduleName, funcName in string.gmatch( content, '{{[{|safeubt:}]-#[Ii]nvoke:([^|]+)|([^}|]+)[^}]*}}' ) do moduleName = formatModuleName( moduleName ) funcName = mw.text.trim( funcName ) if string.find( funcName, '^{{{' ) then funcName = funcName .. '}}}' end table.insert( invokeList, {moduleName=moduleName, funcName=funcName} ) end invokeList = arr.unique( invokeList, function(x) return x.moduleName..x.funcName end ) table.sort( invokeList, function(x, y) return x.moduleName..x.funcName < y.moduleName..y.funcName end ) return invokeList end ---@param pageName string ---@param addCategories boolean ---@return string local function messageBoxUnused( pageName, addCategories ) local mbox = require( 'Module:Mbox' )._mbox local category = addCategories and '[[Category:Unused modules]]' or '' return mbox( 'This module is unused.', string.format( 'This module is neither invoked by a template nor required/loaded by another module. If this is in error, make sure to add <code>{{[[Template:Documentation|Documentation]]}}</code>/<code>{{[[Template:No documentation|No&nbsp;documentation]]}}</code> to the calling template\'s or parent\'s module documentation.', pageName ), { icon = 'WikimediaUI-Alert.svg' } ) .. category end local function collapseList( list, id, listType ) local text = string.format( '%d %s', #list, listType ) local button = '<span>' .. text .. ':</span>&nbsp;' local content = mHatlist.andList( list, false ) return { tostring( button ) .. tostring( content ) } end --- Creates a link to [[Special:Search]] showing all pages found by getDynamicRequireList() in case it found more than MAX_DYNAMIC_REQUIRE_LIST_LENGTH pages. ---@param query string @This will be in a format like 'Module:Wowee/%' or 'Module:Wowee/%/data' ---@return string local function formatDynamicQueryLink( query ) local prefix = query:match( '^([^/]+)' ) local linkText = query:gsub( '%%', '&lt; ... &gt;' ) query = query:gsub( '^Module:', '' ) query = query:gsub( '([^/]+)/?', function ( match ) if match == '%' then return '\\/[^\\/]+' else return '\\/"' .. match .. '"' end end ) query = query:gsub( '^\\/', '' ) query = string.format( 'intitle:/%s%s/i -intitle:/%s\\/""/i -intitle:doc prefix:"%s"', query, query:find( '"$' ) and '' or '""', query, prefix ) return string.format( '<span class="plainlinks">[%s %s]</span>', tostring( mw.uri.fullUrl( 'Special:Search', { search = query } ) ), linkText ) end ---@param templateName string ---@param addCategories boolean ---@param invokeList table<string, string>[] @This is the list returned by getInvokeCallList() ---@return string local function formatInvokeCallList( templateName, addCategories, invokeList ) local category = addCategories and '[[Category:Lua-based templates]]' or '' local res = {} for _, item in ipairs( invokeList ) do local msg = string.format( "'''%s''' invokes function '''%s''' in [[%s]] using [[Star Citizen:Lua|Lua]].", templateName, item.funcName, item.moduleName ) table.insert( res, mHatnote._hatnote( msg, { icon='WikimediaUI-Code.svg' } ) ) end if #invokeList > 0 then table.insert( res, category ) end return table.concat( res ) end ---@param moduleName string ---@param addCategories boolean ---@param whatLinksHere string @A list generated by a dpl of pages in the Template namespace which link to moduleName. ---@return string local function formatInvokedByList( moduleName, addCategories, whatLinksHere ) local function lcfirst( str ) return string.gsub( str, '^[Mm]odule:.', string.lower ) end local templateData = arr.map( whatLinksHere, function(x) return {templateName=x, invokeList=getInvokeCallList(x)} end ) templateData = arr.filter( templateData, function(x) return arr.any( x.invokeList, function(y) return lcfirst(y.moduleName) == lcfirst(moduleName) end ) end ) local invokedByList = {} for _, template in ipairs( templateData ) do for _, invoke in ipairs( template.invokeList ) do table.insert( invokedByList, string.format( "function '''%s''' is invoked by [[%s]]", invoke.funcName, template.templateName ) ) end end table.sort( invokedByList) local res = {} if #invokedByList > COLLAPSE_LIST_LENGTH_THRESHOLD then local msg = string.format( "'''%s''' is invoked by %s.", moduleName, collapseList( invokedByList, 'invokedBy', 'templates' )[1] ) table.insert( res, mHatnote._hatnote( msg, { icon='WikimediaUI-Code.svg' } ) ) else for _, item in ipairs( invokedByList ) do local msg = string.format( "'''%s's''' %s.", moduleName, item ) table.insert( res, mHatnote._hatnote( msg, { icon='WikimediaUI-Code.svg' } ) ) end end if #templateData > 0 then moduleIsUsed = true table.insert( res, (addCategories and '[[Category:Template invoked modules]]' or '') ) end return table.concat( res ) end ---@param moduleName string ---@param addCategories boolean ---@param whatLinksHere string @A list generated by a dpl of pages in the Module namespace which link to moduleName. ---@return string local function formatRequiredByList( moduleName, addCategories, whatLinksHere ) local childModuleData = arr.map( whatLinksHere, function ( title ) local requireList, loadDataList = getRequireList( title ) return {name=title, requireList=requireList, loadDataList=loadDataList} end ) local requiredByList = arr.map( childModuleData, function ( item ) if arr.any( item.requireList, function(x) return x:lower()==moduleName:lower() end ) then if item.name:find( '%%' ) then return formatDynamicQueryLink( item.name ) else return '[[' .. item.name .. ']]' end end end ) local loadedByList = arr.map( childModuleData, function ( item ) if arr.any( item.loadDataList, function(x) return x:lower()==moduleName:lower() end ) then if item.name:find( '%%' ) then return formatDynamicQueryLink( item.name ) else return '[[' .. item.name .. ']]' end end end ) if #requiredByList > 0 or #loadedByList > 0 then moduleIsUsed = true end if #requiredByList > COLLAPSE_LIST_LENGTH_THRESHOLD then requiredByList = collapseList( requiredByList, 'requiredBy', 'modules' ) end if #loadedByList > COLLAPSE_LIST_LENGTH_THRESHOLD then loadedByList = collapseList( loadedByList, 'loadedBy', 'modules' ) end local res = {} for _, requiredByModuleName in ipairs( requiredByList ) do local msg = string.format( "'''%s''' is required by %s.", moduleName, requiredByModuleName ) table.insert( res, mHatnote._hatnote( msg, { icon='WikimediaUI-Code.svg' } ) ) end if #requiredByList > 0 then table.insert( res, (addCategories and '[[Category:Modules required by modules]]' or '') ) end for _, loadedByModuleName in ipairs( loadedByList ) do local msg = string.format( "'''%s''' is loaded by %s.", moduleName, requiredByModuleName ) table.insert( res, mHatnote._hatnote( msg, { icon='WikimediaUI-Code.svg' } ) ) end if #loadedByList > 0 then table.insert( res, (addCategories and '[[Category:Module data]]' or '') ) end return table.concat( res ) end local function formatRequireList( currentPageName, addCategories, requireList ) local res = {} if #requireList > COLLAPSE_LIST_LENGTH_THRESHOLD then requireList = collapseList( requireList, 'require', 'modules' ) end for _, requiredModuleName in ipairs( requireList ) do local msg = string.format( "'''%s''' requires %s.", currentPageName, requiredModuleName ) table.insert( res, mHatnote._hatnote( msg, { icon='WikimediaUI-Code.svg' } ) ) end if #requireList > 0 then table.insert( res, (addCategories and '[[Category:Modules requiring modules]]' or '') ) end return table.concat( res ) end local function formatLoadDataList( currentPageName, addCategories, loadDataList ) local res = {} if #loadDataList > COLLAPSE_LIST_LENGTH_THRESHOLD then loadDataList = collapseList( loadDataList, 'loadData', 'modules' ) end for _, loadedModuleName in ipairs( loadDataList ) do local msg = string.format( "'''%s''' loads data from %s.", currentPageName, loadedModuleName ) table.insert( res, mHatnote._hatnote( msg, { icon='WikimediaUI-Code.svg' } ) ) end if #loadDataList > 0 then table.insert( res, (addCategories and '[[Category:Modules using data]]' or '') ) end return table.concat( res ) end local function formatUsedTemplatesList( currentPageName, addCategories, usedTemplateList ) local res = {} if #usedTemplateList > COLLAPSE_LIST_LENGTH_THRESHOLD then usedTemplateList = collapseList( usedTemplateList, 'usedTemplates', 'templates' ) end for _, templateName in ipairs( usedTemplateList ) do local msg = string.format( "'''%s''' transcludes [[%s]] using <samp>frame:preprocess()</samp>.", currentPageName, templateName ) table.insert( res, mHatnote._hatnote( msg, { icon='WikimediaUI-Code.svg' } ) ) end return table.concat( res ) end function p.main( frame ) local args = frame:getParent().args return p._main( args[1], args.category, args.isUsed ) end ---@param currentPageName string|nil ---@param addCategories boolean|string|nil ---@return string function p._main( currentPageName, addCategories, isUsed ) libraryUtil.checkType( 'Module:RequireList._main', 1, currentPageName, 'string', true ) libraryUtil.checkTypeMulti( 'Module:RequireList._main', 2, addCategories, {'boolean', 'string', 'nil'} ) libraryUtil.checkTypeMulti( 'Module:RequireList._main', 3, isUsed, {'boolean', 'string', 'nil'} ) local title = mw.title.getCurrentTitle() -- Leave early if not in module or template namespace if param.is_empty( currentPageName ) and ( not arr.contains( {'Module', 'Template'}, title.nsText ) ) then return '' end currentPageName = param.default_to( currentPageName, title.fullText ) currentPageName = string.gsub( currentPageName, '/[Dd]oc$', '' ) currentPageName = formatPageName( currentPageName ) addCategories = yn( param.default_to( addCategories, title.subpageText~='doc' ) ) moduleIsUsed = yn( param.default_to( isUsed, false ) ) if title.text:lower():find( 'sandbox' ) then moduleIsUsed = true -- Don't show sandbox modules as unused end if currentPageName:find( '^Template:' ) then local ok, invokeList = pcall( getInvokeCallList, currentPageName ) if ok then return formatInvokeCallList( currentPageName, addCategories, invokeList ) else return userError(invokeList) end end local whatTemplatesLinkHere, whatModulesLinkHere = dpl.ask( { namespace = 'Template', linksto = currentPageName, distinct = 'strict', ignorecase = true, ordermethod = 'title', allowcachedresults = true, cacheperiod = 604800 -- One week }, { namespace = 'Module', linksto = currentPageName, nottitlematch = '%/doc%|' .. currentPageName:gsub( 'Module:', '' ), distinct = 'strict', ignorecase = true, ordermethod = 'title', allowcachedresults = true, cacheperiod = 604800 -- One week } ) local requireList, loadDataList, usedTemplateList, extraCategories; do local ok; ok, requireList, loadDataList, usedTemplateList, extraCategories = pcall(getRequireList, currentPageName, true); if not ok then return userError(requireList); end end requireList = arr.map( requireList, function ( moduleName ) if moduleName:find( '%%' ) then return formatDynamicQueryLink( moduleName ) else return '[[' .. moduleName .. ']]' end end ) loadDataList = arr.map( loadDataList, function ( moduleName ) if moduleName:find( '%%' ) then return formatDynamicQueryLink( moduleName ) else return '[[' .. moduleName .. ']]' end end ) usedTemplateList = arr.map( usedTemplateList, function( templateName ) if string.find( templateName, ':' ) then -- Real templates are prefixed by a namespace, magic words are not return '[['..templateName..']]' else return "'''&#123;&#123;"..templateName.."&#125;&#125;'''" -- Magic words don't have a page so make them bold instead end end ) local res = {} table.insert( res, formatInvokedByList( currentPageName, addCategories, whatTemplatesLinkHere ) ) table.insert( res, formatRequireList( currentPageName, addCategories, requireList ) ) table.insert( res, formatLoadDataList( currentPageName, addCategories, loadDataList ) ) table.insert( res, formatUsedTemplatesList( currentPageName, addCategories, usedTemplateList ) ) table.insert( res, formatRequiredByList( currentPageName, addCategories, whatModulesLinkHere ) ) if addCategories then extraCategories = arr.map(extraCategories, function(categoryName) return "[[Category:" .. categoryName .. "]]"; end); table.insert(res, table.concat(extraCategories)); end if not moduleIsUsed then table.insert( res, 1, messageBoxUnused( currentPageName:gsub( 'Module:', '' ), addCategories ) ) end return table.concat( res ) end return p -- </nowiki> d5f03ab1075172cdbb69e217ef5ed86f0d973480 Module:DependencyList/doc 828 48 112 2024-02-10T00:51:53Z Aniceto 2 Created page with "{{Documentation}} '''Module:DependencyList''' generates a list of dependency used by template and module documentation." wikitext text/x-wiki {{Documentation}} '''Module:DependencyList''' generates a list of dependency used by template and module documentation. 4acf5a5f8ed51be0a6c10bf05796627d82af8d02 Module:Array 828 49 113 2024-02-10T00:52:42Z Aniceto 2 Created page with "-- Imported from: https://runescape.wiki/w/Module:Array local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeMulti = libraryUtil.checkTypeMulti ---@class Array ---@operator call(any[]): Array ---@operator concat(any[]): Array ---@operator concat(number|string|function): string ---@operator unm: Array ---@operator add(number|number[]|Array): Array ---@operator sub(number|number[]|Array): Array ---@operator mul(number|number[]..." Scribunto text/plain -- Imported from: https://runescape.wiki/w/Module:Array local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeMulti = libraryUtil.checkTypeMulti ---@class Array ---@operator call(any[]): Array ---@operator concat(any[]): Array ---@operator concat(number|string|function): string ---@operator unm: Array ---@operator add(number|number[]|Array): Array ---@operator sub(number|number[]|Array): Array ---@operator mul(number|number[]|Array): Array ---@operator div(number|number[]|Array): Array ---@operator pow(number|number[]|Array): Array local Array = { pop = table.remove } Array.__index = Array setmetatable(Array, { __index = table, __call = function (_, arr) return Array.new(arr) end }) -- function Array.__tostring(arr) -- -- local dumpObject = require('Module:Logger').dumpObject -- require 'log' -- local dumpObject = dumpObject -- local mt = getmetatable(arr) -- setmetatable(arr, nil) -- local str = dumpObject(arr, {clean=true, collapseLimit=100}) -- setmetatable(arr, mt) -- return str -- end function Array.__concat(lhs, rhs) if type(lhs) == 'table' and type(rhs) == 'table' then local res = {} for i = 1, #lhs do res[i] = lhs[i] end local l = #lhs for i = 1, #rhs do res[i + l] = rhs[i] end return setmetatable(res, getmetatable(lhs) or getmetatable(rhs)) else return tostring(lhs) .. tostring(rhs) end end function Array.__unm(arr) return Array.map(arr, function(x) return -x end) end ---@param lhs number|number[]|Array ---@param rhs number|number[]|Array ---@param funName string ---@param opName string ---@param fun fun(lhs: number, rhs: number): number ---@return Array local function mathTemplate(lhs, rhs, funName, opName, fun) checkTypeMulti('Module:Array.' .. funName, 1, lhs, {'number', 'table'}) checkTypeMulti('Module:Array.' .. funName, 2, rhs, {'number', 'table'}) local res = {} if type(lhs) == 'number' then for i = 1, #rhs do res[i] = fun(lhs, rhs[i]) end elseif type(rhs) == 'number' then for i = 1, #lhs do res[i] = fun(lhs[i], rhs) end else assert(#lhs == #rhs, string.format('Elementwise %s failed because arrays have different sizes (left: %d, right: %d)', opName, #lhs, #rhs)) for i = 1, #lhs do res[i] = fun(lhs[i], rhs[i]) end end return setmetatable(res, getmetatable(lhs) or getmetatable(rhs)) end function Array.__add(lhs, rhs) return mathTemplate(lhs, rhs, '__add', 'addition', function(x, y) return x + y end) end function Array.__sub(lhs, rhs) return mathTemplate(lhs, rhs, '__sub', 'substraction', function(x, y) return x - y end) end function Array.__mul(lhs, rhs) return mathTemplate(lhs, rhs, '__mul', 'multiplication', function(x, y) return x * y end) end function Array.__div(lhs, rhs) return mathTemplate(lhs, rhs, '__div', 'division', function(x, y) return x / y end) end function Array.__pow(lhs, rhs) return mathTemplate(lhs, rhs, '__pow', 'exponentiation', function(x, y) return x ^ y end) end function Array.__eq(lhs, rhs) if #lhs ~= #rhs then return false end for i = 1, #lhs do if lhs[i] ~= rhs[i] then return false end end return true end ---Behaviour depends on the value of `fn`: ---* `nil` - Checks that the array doesn't contain any **false** elements. ---* `fun(elem: any, i?: integer): boolean` - Returns **true** if `fn` returns **true** for every element. ---* `number` | `table` | `boolean` - Checks that all elements in `arr` are equal to this value. ---@param arr any[] ---@param fn? any ---@return boolean function Array.all(arr, fn) checkType('Module:Array.all', 1, arr, 'table') if fn == nil then fn = function(item) return item end end if type(fn) ~= 'function' then local val = fn fn = function(item) return item == val end end local i = 1 while arr[i] ~= nil do ---@diagnostic disable-next-line: redundant-parameter if not fn(arr[i], i) then return false end i = i + 1 end return true end ---Behaviour depends on the value of `fn`: ---* `nil` - Checks that the array contains at least one non **false** element. ---* `fun(elem: any, i?: integer): boolean` - Returns **true** if `fn` returns **true** for at least one element. ---* `number` | `table` | `boolean` - Checks that `arr` contains this value. ---@param arr any[] ---@param fn? any ---@return boolean function Array.any(arr, fn) checkType('Module:Array.any', 1, arr, 'table') if fn == nil then fn = function(item) return item end end if type(fn) ~= 'function' then local val = fn fn = function(item) return item == val end end local i = 1 while arr[i] ~= nil do ---@diagnostic disable-next-line: redundant-parameter if fn(arr[i], i) then return true end i = i + 1 end return false end ---Recursively removes all metatables. ---@param arr any[] ---@return any[] function Array.clean(arr) checkType('Module:Array.clean', 1, arr, 'table') for i = 1, #arr do if type(arr[i]) == 'table' then Array.clean(arr[i]) end end setmetatable(arr, nil) return arr end ---Make a copy of the input table. Preserves metatables. ---@generic T: any[] ---@param arr T ---@param deep? boolean # Recursively clone subtables if **true**. ---@return T function Array.clone(arr, deep) checkType('Module:Array.clone', 1, arr, 'table') checkType('Module:Array.clone', 2, deep, 'boolean', true) local res = {} for i = 1, #arr do if deep == true and type(arr[i]) == 'table' then res[i] = Array.clone(arr[i], true) else res[i] = arr[i] end end return setmetatable(res, getmetatable(arr)) end ---Check if `arr` contains `val`. ---@param arr any[] ---@param val any ---@return boolean function Array.contains(arr, val) checkType('Module:Array.contains', 1, arr, 'table') for i = 1, #arr do if arr[i] == val then return true end end return false end ---Check if `arr` contains any of the values in the table `t`. ---@param arr any[] ---@param t any[] ---@return boolean function Array.containsAny(arr, t) checkType('Module:Array.containsAny', 1, arr, 'table') checkType('Module:Array.containsAny', 2, t, 'table') local lookupTbl = {} for i = 1, #t do lookupTbl[t[i]] = true end for i = 1, #arr do if lookupTbl[arr[i]] then return true end end return false end ---Check if `arr` contains all values in the table `t`. ---@param arr any[] ---@param t any[] ---@return boolean function Array.containsAll(arr, t) checkType('Module:Array.containsAll', 1, arr, 'table') checkType('Module:Array.containsAll', 2, t, 'table') local lookupTbl = {} local l = #t local trueCount = 0 for i = 1, l do lookupTbl[t[i]] = false end for i = 1, #arr do if lookupTbl[arr[i]] == false then lookupTbl[arr[i]] = true trueCount = trueCount + 1 end if trueCount == l then return true end end return false end ---Convolute two number arrays. ---@generic T: number[] ---@param x T ---@param y T ---@return T function Array.convolve(x, y) checkType('Module:Array.convolve', 1, x, 'table') checkType('Module:Array.convolve', 2, y, 'table') local z = {} local xLen, yLen = #x, #y for j = 1, (xLen + yLen - 1) do local sum = 0 for k = math.max(1, j - yLen + 1), math.min(xLen, j) do sum = sum + x[k] * y[j-k+1] end z[j] = sum end return setmetatable(z, getmetatable(x) or getmetatable(y)) end ---Remove **nil** values from `arr` while preserving order. ---@generic T: any[] ---@param arr T ---@return T function Array.condenseSparse(arr) checkType('Module:Array.condenseSparse', 1, arr, 'table') local keys = {} local res = {} local l = 0 for k in pairs(arr) do l = l + 1 keys[l] = k end table.sort(keys) for i = 1, l do res[i] = arr[keys[i]] end return setmetatable(res, getmetatable(arr)) end ---Behaviour depends on value of `val`: ---* `nil` - Counts the number of non **false** elements. ---* `fun(elem: any): boolean` - Count the number of times the function returned **true**. ---* `boolean` | `number` | `table` - Counts the number of times this value occurs in `arr`. ---@param arr any[] ---@param val? any ---@return integer function Array.count(arr, val) checkType('Module:Array.count', 1, arr, 'table') if val == nil then val = function(item) return item end end if type(val) ~= 'function' then local _val = val val = function(item) return item == _val end end local count = 0 for i = 1, #arr do if val(arr[i]) then count = count + 1 end end return count end ---Differentiate the array ---@generic T: number[] ---@param arr T ---@param order number? # Oder of the differentiation. Default is 1. ---@return T # Length is `#arr - order` function Array.diff(arr, order) checkType('Module:Array.diff', 1, arr, 'table') checkType('Module:Array.diff', 2, order, 'number', true) local res = {} for i = 1, #arr - 1 do res[i] = arr[i+1] - arr[i] end if order and order > 1 then return Array.diff(res, order - 1) end return setmetatable(res, getmetatable(arr)) end ---Loops over `arr` and passes each element as the first argument to `fn`. This function returns nothing. ---@param arr any[] ---@param fn fun(elem: any, i?: integer) function Array.each(arr, fn) checkType('Module:Array.each', 1, arr, 'table') checkType('Module:Array.each', 2, fn, 'function') local i = 1 while arr[i] ~= nil do fn(arr[i], i) i = i + 1 end end ---Makes a copy of `arr` with only elements for which `fn` returned **true**. ---@generic T: any[] ---@param arr T ---@param fn fun(elem: any, i?: integer): boolean ---@return T function Array.filter(arr, fn) checkType('Module:Array.filter', 1, arr, 'table') checkType('Module:Array.filter', 2, fn, 'function') local r = {} local len = 0 local i = 1 while arr[i] ~= nil do if fn(arr[i], i) then len = len + 1 r[len] = arr[i] end i = i + 1 end return setmetatable(r, getmetatable(arr)) end ---Find the first elements for which `fn` returns **true**. ---@param arr any[] ---@param fn any # A value to look for or a function of the form `fun(elem: any, i?: integer): boolean`. ---@param default? any # Value to return if no element passes the test. ---@return any? elem # The first element that passed the test. ---@return integer? i # The index of the item that passed the test. function Array.find(arr, fn, default) checkType('Module:Array.find', 1, arr, 'table') checkTypeMulti('Module:Array.find_index', 2, fn, {'function', 'table', 'number', 'boolean'}) if type(fn) ~= 'function' then local _val = fn fn = function(item) return item == _val end end local i = 1 while arr[i] ~= nil do ---@diagnostic disable-next-line: redundant-parameter if fn(arr[i], i) then return arr[i], i end i = i + 1 end return default, nil end ---Find the index of `val`. ---@param arr any[] ---@param val any # A value to look for or a function of the form `fun(elem: any, i?: integer): boolean`. ---@param default? any # Value to return if no element passes the test. ---@return integer? function Array.find_index(arr, val, default) checkType('Module:Array.find_index', 1, arr, 'table') checkTypeMulti('Module:Array.find_index', 2, val, {'function', 'table', 'number', 'boolean'}) if type(val) ~= 'function' then local _val = val val = function(item) return item == _val end end local i = 1 while arr[i] ~= nil do ---@diagnostic disable-next-line: redundant-parameter if val(arr[i], i) then return i end i = i + 1 end return default end ---Extracts a subset of `arr`. ---@generic T: any[] ---@param arr T ---@param indexes integer|integer[] # Indexes of the elements. ---@return T function Array.get(arr, indexes) checkType('Module:Array.set', 1, arr, 'table') checkTypeMulti('Module:Array.set', 2, indexes, {'table', 'number'}) if type(indexes) == 'number' then indexes = {indexes} end local res = {} for i = 1, #indexes do res[i] = arr[indexes[i]] end return setmetatable(res, getmetatable(arr)) end ---Integrates the array. Effectively does $\left\{\sum^{n}_{start}{arr[n]} \,\Bigg|\, n \in [start, stop]\right\}$. ---@generic T: number[] ---@param arr T # number[] ---@param start? integer # Index where to start the summation. Defaults to 1. ---@param stop? integer # Index where to stop the summation. Defaults to #arr. ---@return T function Array.int(arr, start, stop) checkType('Module:Array.int', 1, arr, 'table') checkType('Module:Array.int', 2, start, 'number', true) checkType('Module:Array.int', 3, stop, 'number', true) local res = {} start = start or 1 stop = stop or #arr res[1] = arr[start] for i = 1, stop - start do res[i+1] = res[i] + arr[start + i] end return setmetatable(res, getmetatable(arr)) end ---Returns an array with elements that are present in both tables. ---@generic T: any[] ---@param arr1 T ---@param arr2 T ---@return T function Array.intersect(arr1, arr2) checkType('Module:Array.intersect', 1, arr1, 'table') checkType('Module:Array.intersect', 2, arr2, 'table') local arr2Elements = {} local res = {} local len = 0 Array.each(arr2, function(item) arr2Elements[item] = true end) Array.each(arr1, function(item) if arr2Elements[item] then len = len + 1 res[len] = item end end) return setmetatable(res, getmetatable(arr1) or getmetatable(arr2)) end ---Checks if the two inputs have at least one element in common. ---@param arr1 any[] ---@param arr2 any[] ---@return boolean function Array.intersects(arr1, arr2) checkType('Module:Array.intersects', 1, arr1, 'table') checkType('Module:Array.intersects', 2, arr2, 'table') local small = {} local large if #arr1 <= #arr2 then Array.each(arr1, function(item) small[item] = true end) large = arr2 else Array.each(arr2, function(item) small[item] = true end) large = arr1 end return Array.any(large, function(item) return small[item] end) end ---Inserts values into `arr`. ---@generic T: any[] ---@param arr T ---@param val any # If `val` is an array and `unpackVal` is **true** then the individual elements of `val` are inserted. ---@param index? integer # Location to start the insertion. Default is at the end of `arr`. ---@param unpackVal? boolean # Default is **false**. ---@return T ---@overload fun(arr: T, val: any, unpackVal: boolean): T function Array.insert(arr, val, index, unpackVal) checkType('Module:Array.insert', 1, arr, 'table') checkTypeMulti('Module:Array.insert', 3, index, {'number', 'boolean', 'nil'}) checkType('Module:Array.insert', 4, unpackVal, 'boolean', true) if type(index) == 'boolean' then unpackVal, index = index, nil end local len = #arr index = index or (len + 1) local mt = getmetatable(arr) setmetatable(arr, nil) if type(val) == 'table' and unpackVal then local len2 = #val for i = 0, len - index do arr[len + len2 - i] = arr[len - i] end for i = 0, len2 - 1 do arr[index + i] = val[i + 1] end else table.insert(arr, index, val) end return setmetatable(arr, mt) end ---Returns the last element of `arr`. ---@param arr any[] ---@param offset? integer ---@return any function Array.last(arr, offset) checkType('Module:Array.last', 1, arr, 'table') checkType('Module:Array.last', 2, offset, 'number', true) return arr[#arr + offset] end ---Returns a new table were each element of `arr` is modified by `fn`. ---@generic T: any[] ---@param arr T ---@param fn fun(elem: any, i?: integer): any # First argument is the current element, the second argument is the index of the current element. ---@return T function Array.map(arr, fn) checkType('Module:Array.map', 1, arr, 'table') checkType('Module:Array.map', 2, fn, 'function') local len = 0 local r = {} local i = 1 while arr[i] ~= nil do local tmp = fn(arr[i], i) if tmp ~= nil then len = len + 1 r[len] = tmp end i = i + 1 end return setmetatable(r, getmetatable(arr)) end ---Find the element for which `fn` returned the largest value. ---@param arr any[] ---@param fn fun(elem: any): any # The returned value needs to be comparable using the `<` operator. ---@return any elem # The element with the largest `fn` value. ---@return integer i # The index of this element. function Array.max_by(arr, fn) checkType('Module:Array.max_by', 1, arr, 'table') checkType('Module:Array.max_by', 2, fn, 'function') return unpack(Array.reduce(arr, function(new, old, i) local y = fn(new) return y > old[2] and {new, y, i} or old end, {nil, -math.huge})) end ---Find the largest value in the array. ---@param arr any[] # The values need to be comparable using the `<` operator. ---@return any elem ---@return integer i # The index of the largest value. function Array.max(arr) checkType('Module:Array.max', 1, arr, 'table') local val, _, i = Array.max_by(arr, function(x) return x end) return val, i end ---Find the smallest value in the array. ---@param arr any[] # The values need to be comparable using the `<` operator. ---@return any elem ---@return integer i # The index of the smallest value. function Array.min(arr) checkType('Module:Array.min', 1, arr, 'table') local val, _, i = Array.max_by(arr, function(x) return -x end) return val, i end ---Turn the input table into an Array. This makes it possible to use the colon `:` operator to access the Array methods. --- ---It also enables the use of math operators with the array. ---``` ---local x = arr.new{ 1, 2, 3 } ---local y = arr{ 4, 5, 6 } -- Alternative notation --- ---print( -x ) --> { -1, -2, -3 } ---print( x + 2 ) --> { 3, 4, 5 } ---print( x - 2 ) --> { -1, 0, 1 } ---print( x * 2 ) --> { 2, 4, 6 } ---print( x / 2 ) --> { 0.5, 1, 1.5 } ---print( x ^ 2 ) --> { 1, 4, 9 } --- ---print( x + y ) --> { 5, 7, 9 } ---print( x .. y ) --> { 1, 2, 3, 4, 5, 6 } ---print( (x .. y):reject{3, 4, 5} ) --> { 1, 2, 6 } ---print( x:sum() ) --> 6 --- ---print( x:update( {1, 3}, y:get{2, 3} * 2 ) ) --> { 10, 2, 12 } ---``` ---@param arr? any[] ---@return Array function Array.new(arr) local obj = arr or {} for _, v in pairs(obj) do if type(v) == 'table' then Array.new(v) end end if getmetatable(obj) == nil then setmetatable(obj, Array) end return obj end ---Creates an object that returns a value that is `step` higher than the previous value each time it gets called. --- ---The stored value can be read without incrementing by reading the `val` field. --- ---A new stored value can be set through the `val` field. --- ---A new step size can be set through the `step` field. ---``` ---local inc = arr.newIncrementor(10, 5) ---print( inc() ) --> 10 ---print( inc() ) --> 15 ---print( inc.val ) --> 15 ---inc.val = 100 ---inc.step = 20 ---print( inc.val ) --> 100 ---print( inc() ) --> 120 ---``` ---@param start? number # Default is 1. ---@param step? number # Default is 1. ---@return Incrementor function Array.newIncrementor(start, step) checkType('Module:Array.newIncrementor', 1, start, 'number', true) checkType('Module:Array.newIncrementor', 2, step, 'number', true) step = step or 1 local n = (start or 1) - step ---@class Incrementor local obj = {} return setmetatable(obj, { __call = function() n = n + step return n end, __tostring = function() return n end, __index = function() return n end, __newindex = function(self, k, v) if k == 'step' and type(v) == 'number' then step = v elseif type(v) == 'number' then n = v end end, __concat = function(x, y) return tostring(x) .. tostring(y) end }) end ---Returns a range of numbers. ---@param start number # Start value inclusive. ---@param stop number # Stop value inclusive for integers, exclusive for floats. ---@param step? number # Default is 1. ---@return Array ---@overload fun(stop: number): Array function Array.range(start, stop, step) checkType('Module:Array.range', 1, start, 'number') checkType('Module:Array.range', 2, stop, 'number', true) checkType('Module:Array.range', 3, step, 'number', true) local arr = {} local len = 0 if not stop then stop = start start = 1 end for i = start, stop, step or 1 do len = len + 1 arr[len] = i end return setmetatable(arr, Array) end ---Condenses the array into a single value. --- ---For each element `fn` is called with the current element, the current accumulator, and the current element index. The returned value of `fn` becomes the accumulator for the next element. --- ---If no `accumulator` value is given at the start then the first element off `arr` becomes the accumulator and the iteration starts from the second element. ---``` ---local t = { 1, 2, 3, 4 } ---local sum = arr.reduce( t, function(elem, acc) return acc + elem end ) -- sum == 10 ---``` ---@param arr any[] ---@param fn fun(elem: any, acc: any, i?: integer): any # The result of this function becomes the `acc` for the next element. ---@param accumulator? any ---@return any # This is the last accumulator value. function Array.reduce(arr, fn, accumulator) checkType('Module:Array.reduce', 1, arr, 'table') checkType('Module:Array.reduce', 2, fn, 'function') local acc = accumulator local i = 1 if acc == nil then acc = arr[1] i = 2 end while arr[i] ~= nil do acc = fn(arr[i], acc, i) i = i + 1 end return acc end ---Make a copy off `arr` with certain values removed. --- ---Behaviour for different values of `val`: ---* `boolean` | `number` - Remove values equal to this. ---* `table` - Remove all values in this table. ---* `fun(elem: any, i?: integer): boolean` - Remove elements for which the functions returns **true**. ---@generic T: any[] ---@param arr T ---@param val table|function|number|boolean ---@return T function Array.reject(arr, val) checkType('Module:Array.reject', 1, arr, 'table') checkTypeMulti('Module:Array.reject', 2, val, {'function', 'table', 'number', 'boolean'}) if type(val) ~= 'function' and type(val) ~= 'table' then val = {val} end local r = {} local len = 0 if type(val) == 'function' then local i = 1 while arr[i] ~= nil do if not val(arr[i], i) then len = len + 1 r[len] = arr[i] end i = i + 1 end else local rejectMap = {} Array.each(val --[[@as any[] ]], function(item) rejectMap[item] = true end) local i = 1 while arr[i] ~= nil do if not rejectMap[arr[i]] then len = len + 1 r[len] = arr[i] end i = i + 1 end end return setmetatable(r, getmetatable(arr)) end ---Returns an Array with `val` repeated `n` times. ---@param val any ---@param n integer ---@return Array function Array.rep(val, n) checkType('Module:Array.rep', 2, n, 'number') local r = {} for i = 1, n do r[i] = val end return setmetatable(r, Array) end ---Condenses the array into a single value while saving every accumulator value. --- ---For each element `fn` is called with the current element, the current accumulator, and the current element index. The returned value of `fn` becomes the accumulator for the next element. --- ---If no `accumulator` value is given at the start then the first element off `arr` becomes the accumulator and the iteration starts from the second element. ---``` ---local t = { 1, 2, 3, 4 } ---local x = arr.scan( t, function(elem, acc) return acc + elem end ) -- x = { 1, 3, 6, 10 } ---``` ---@generic T: any[] ---@param arr T ---@param fn fun(elem: any, acc: any, i?: integer): any # Returned value becomes the accumulator for the next element. ---@param accumulator? any ---@return T function Array.scan(arr, fn, accumulator) checkType('Module:Array.scan', 1, arr, 'table') checkType('Module:Array.scan', 2, fn, 'function') local acc = accumulator local r = {} local i = 1 while arr[i] ~= nil do if i == 1 and not accumulator then acc = arr[i] else acc = fn(arr[i], acc, i) end r[i] = acc i = i + 1 end return setmetatable(r, getmetatable(arr)) end ---Update a range of index with a range of values. --- ---If if only one value is given but multiple indexes than that value is set for all those indexes. --- ---If `values` is a table then it must of the same length as `indexes`. ---@generic T: any[] ---@param arr T ---@param indexes integer|integer[] ---@param values any|any[] ---@return T function Array.set(arr, indexes, values) checkType('Module:Array.set', 1, arr, 'table') checkTypeMulti('Module:Array.set', 2, indexes, {'table', 'number'}) local mt = getmetatable(arr) setmetatable(arr, nil) if type(indexes) == 'number' then indexes = {indexes} end if type(values) == 'table' then assert(#indexes == #values, string.format("Module:Array.set: 'indexes' and 'values' arrays are not equal length (#indexes = %d, #values = %d)", #indexes, #values)) for i = 1, #indexes do arr[indexes[i]] = values[i] end else for i = 1, #indexes do arr[indexes[i]] = values end end return setmetatable(arr, mt) end ---Extract a subtable from `arr`. ---@generic T: any[] ---@param arr T ---@param start integer # Start index. Use negative values to count form the end of the array. ---@param stop integer # Stop index. Use negative values to count form the end of the array. ---@return T ---@overload fun(arr: T, stop: integer): T function Array.slice(arr, start, stop) checkType('Module:Array.slice', 1, arr, 'table') checkType('Module:Array.slice', 2, start, 'number', true) checkType('Module:Array.slice', 3, stop, 'number', true) start = start or #arr if start < 0 then start = #arr + start end if stop == nil then stop = start start = 1 end if stop < 0 then stop = #arr + stop end local r = {} local len = 0 for i = start, stop do len = len + 1 r[len] = arr[i] end return setmetatable(r, getmetatable(arr)) end ---Split `arr` into two arrays. ---@generic T: any[] ---@param arr T ---@param index integer # Index to split on. ---@return T x # [1, index] ---@return T y # [index + 1, #arr] function Array.split(arr, index) checkType('Module:Array.split', 1, arr, 'table') checkType('Module:Array.split', 2, index, 'number') local x = {} local y = {} for i = 1, #arr do table.insert(i <= index and x or y, arr[i]) end return setmetatable(x, getmetatable(arr)), setmetatable(y, getmetatable(arr)) end ---Returns the sum of all elements of `arr`. ---@param arr number[] ---@return number function Array.sum(arr) checkType('Module:Array.sum', 1, arr, 'table') local res = 0 for i = 1, #arr do res = res + arr[i] end return res end ---Extract a subtable from `arr`. ---@generic T: any[] ---@param arr T ---@param count integer # Length of the subtable. ---@param start? integer # Start index. Default is 1. ---@return T function Array.take(arr, count, start) checkType('Module:Array.take', 1, arr, 'table') checkType('Module:Array.take', 2, count, 'number') checkType('Module:Array.take', 3, start, 'number', true) local x = {} start = start or 1 for i = start, math.min(#arr, count + start - 1) do table.insert(x, arr[i]) end return setmetatable(x, getmetatable(arr)) end ---Extract a subtable from `arr`. ---``` ---local t = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 } ---local x = arr.take_every( t, 2 ) --> x = { 1, 3, 5, 7, 9 } ---local x = arr.take_every( t, 2, 3 ) --> x = { 1, 3, 5 } ---local x = arr.take_every( t, 2, 3, 2 ) --> x = { 2, 4, 6 } --- ``` ---@generic T: any[] ---@param arr T ---@param n integer # Step size. ---@param start? integer # Start index. ---@param count? integer # Max amount of elements to get. ---@return T function Array.take_every(arr, n, start, count) checkType('Module:Array.take_every', 1, arr, 'table') checkType('Module:Array.take_every', 2, n, 'number') checkType('Module:Array.take_every', 3, start, 'number', true) checkType('Module:Array.take_every', 4, count, 'number', true) count = count or #arr local r = {} local len = 0 local i = start or 1 while arr[i] ~= nil and len < count do len = len + 1 r[len] = arr[i] i = i + n end return setmetatable(r, getmetatable(arr)) end ---Return a new table with all duplicates removed. ---@generic T: any[] ---@param arr T ---@param fn? fun(elem: any): any # Function to generate an id for each element. The result will then contain elements that generated unique ids. ---@return T function Array.unique(arr, fn) checkType('Module:Array.unique', 1, arr, 'table') checkType('Module:Array.unique', 2, fn, 'function', true) fn = fn or function(item) return item end local r = {} local len = 0 local hash = {} local i = 1 while arr[i] ~= nil do local id = fn(arr[i]) if not hash[id] then len = len + 1 r[len] = arr[i] hash[id] = true end i = i + 1 end return setmetatable(r, getmetatable(arr)) end ---Combine elements with the same index from multiple arrays. ---``` ---local x = {1, 2, 3} ---local y = {4, 5, 6, 7} ---local z = arr.zip( x, y ) --> z = { { 1, 4 }, { 2, 5 }, { 3, 6 }, { 7 } } ---``` ---@param ... any[] ---@return Array function Array.zip(...) local arrs = { ... } checkType('Module:Array.zip', 1, arrs[1], 'table') local r = {} local _, longest = Array.max_by(arrs, function(arr) return #arr end) for i = 1, longest do local q = {} for j = 1, #arrs do table.insert(q, arrs[j][i]) end table.insert(r, setmetatable(q, Array)) end return setmetatable(r, Array) end -- Range indexing has a performance impact so this is placed in a separate subclass Array.RI_mt = {} for k, v in pairs(Array) do Array.RI_mt[k] = v end function Array.RI_mt.__index(t, k) if type(k) == 'table' then local res = {} for i = 1, #k do res[i] = t[k[i]] end return setmetatable(res, Array) else return Array[k] end end function Array.RI_mt.__newindex(t, k, v) if type(k) == 'table' then if type(v) == 'table' then for i = 1, #k do t[k[i]] = v[i] end else for i = 1, #k do t[k[i]] = v end end else rawset(t, k, v) end end ---Enable range indexing on the input array. --- ---This has a performance impact on reads and writes to the table. ---``` ---local t = arr{10, 11, 12, 13, 14, 15}:ri() ---print( t[{2, 3}] ) --> { 11, 12 } ---``` ---@param arr any[] ---@param recursive? boolean # Default is false. ---@return Array function Array.ri(arr, recursive) checkType('Module:Array.ri', 1, arr, 'table') checkType('Module:Array.ri', 2, recursive, 'boolean', true) arr = arr or {} if recursive then for _, v in pairs(arr) do if type(v) == 'table' then Array.ri(v, true) end end end if getmetatable(arr) == nil or getmetatable(arr) == Array then setmetatable(arr, Array.RI_mt) end return arr end ---Globally enable range indexing on all Array objects by default. ---@param set boolean function Array.allwaysAllowRangeIndexing(set) checkType('Module:Array.allwaysAllowRangeIndexing', 1, set, 'boolean') if set then Array.__index = Array.RI_mt.__index Array.__newindex = Array.RI_mt.__newindex else Array.__index = Array Array.__newindex = nil end end return Array c81adb59b4d3a4728952df3ad8d681664333a799 Module:Array/doc 828 50 114 2024-02-10T00:53:45Z Aniceto 2 Created page with "{{Documentation}} This module is a helper module to be used by other modules; it may not designed to be invoked directly. See [https://runescape.wiki/w/Module:Array Module:Array] on RuneScape Wiki for more details." wikitext text/x-wiki {{Documentation}} This module is a helper module to be used by other modules; it may not designed to be invoked directly. See [https://runescape.wiki/w/Module:Array Module:Array] on RuneScape Wiki for more details. cc355fd2caa0ebf8305fe4c23f4f99e490d0bd5e Module:Yesno 828 51 115 2024-02-10T00:54:15Z Aniceto 2 Created page with "-- Imported from: https://en.wikipedia.org/wiki/Module:Yesno -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then..." Scribunto text/plain -- Imported from: https://en.wikipedia.org/wiki/Module:Yesno -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == 'on' or val == 'ja' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == 'off' or val == 'nein' or tonumber(val) == 0 then return false else return default end end 4cb9790f60303552aa5d331d9ab52f0a3e1f266e Module:Yesno/doc 828 52 116 2024-02-10T00:54:40Z Aniceto 2 Created page with "{{Documentation|fromWikipedia=true}} '''Module:Yesno''' provides a consistent interface for processing boolean or boolean-style string input. While Lua allows the <code>true</code> and <code>false</code> boolean values, wikicode templates can only express boolean values through strings such as "yes", "no", etc. This module processes these kinds of strings and turns them into boolean input for Lua to process. It also returns <code>nil</code> values as <code>nil</code>, t..." wikitext text/x-wiki {{Documentation|fromWikipedia=true}} '''Module:Yesno''' provides a consistent interface for processing boolean or boolean-style string input. While Lua allows the <code>true</code> and <code>false</code> boolean values, wikicode templates can only express boolean values through strings such as "yes", "no", etc. This module processes these kinds of strings and turns them into boolean input for Lua to process. It also returns <code>nil</code> values as <code>nil</code>, to allow for distinctions between <code>nil</code> and <code>false</code>. The module also accepts other Lua structures as input, i.e. booleans, numbers, tables, and functions. If it is passed input that it does not recognise as boolean or <code>nil</code>, it is possible to specify a default value to return. 7df1d58cff1f0db43e23521d8b074d574354c386 Template:Nbsp 10 53 117 2024-02-10T00:56:15Z Aniceto 2 Created page with "-- Imported from: https://runescape.wiki/w/Module:Paramtest -- {{Helper module |name=Paramtest |fname1 = is_empty(arg) |ftype1 = String |fuse1 = Returns true if arg is not defined or contains only whitespace |fname2 = has_content(arg) |ftype2 = String |fuse2 = Returns true if arg exists and does not only contain whitespace |fname3 = default_to(arg1,arg2) |ftype3 = String, Any value |fuse3 = If arg1 exists and does not only contain whitespace, the function returns arg1..." wikitext text/x-wiki -- Imported from: https://runescape.wiki/w/Module:Paramtest --[[ {{Helper module |name=Paramtest |fname1 = is_empty(arg) |ftype1 = String |fuse1 = Returns true if arg is not defined or contains only whitespace |fname2 = has_content(arg) |ftype2 = String |fuse2 = Returns true if arg exists and does not only contain whitespace |fname3 = default_to(arg1,arg2) |ftype3 = String, Any value |fuse3 = If arg1 exists and does not only contain whitespace, the function returns arg1, otherwise returns arg2 |fname4 = defaults{ {arg1,arg2},...} |ftype4 = {String, Any value}... |fuse4 = Does the same as <code>default_to()</code> run over every table passed |fname5 = table_is_empty(arg) |ftype5 = Table |fuse5 = Returns true if the table has no content, it does not check if the content of the table contains anything |fname6 = table_has_content(arg) |ftype6 = Table |fuse6 = returns true if the table has content, it does not check if the content of the table contains anything }} --]] local checkType, checkTypeForNamedArg do local _libraryUtil = require("libraryUtil"); checkType = _libraryUtil.checkType; checkTypeForNamedArg = _libraryUtil.checkTypeForNamedArg; end -- -- Tests basic properties of parameters -- local p = {} -- -- Tests if the parameter is empty, all white space, or undefined -- function p.is_empty(arg) return not string.find(arg or '', '%S') end -- -- Tests if the table parameter is empty -- function p.table_is_empty(arg) for _, _ in pairs(arg) do return false end return true end -- -- Returns the parameter if it has any content, the default (2nd param) -- function p.default_to(arg, default) if string.find(arg or '', '%S') then return arg else return default end end -- -- Returns a list of paramaters if it has any content, or the default -- function p.defaults(args) checkType("defaults", 1, args, "table"); local ret = {} for i, v in ipairs(args) do checkTypeForNamedArg("defaults", i, v, "table"); ret[i] = p.default_to(v[1], v[2]); end return unpack(ret, 1, #args); end -- -- Tests if the parameter has content -- The same as !is_empty, but this is more readily clear -- function p.has_content(arg) return string.find(arg or '', '%S') end -- -- Tests if the table parameter has content -- The same as !table_is_empty, but this is more readily clear -- function p.table_has_content(arg) for _, _ in pairs(arg) do return true end return false end -- -- uppercases first letter -- function p.ucfirst(arg) if not arg or arg:len() == 0 then return nil elseif arg:len() == 1 then return arg:upper() else return arg:sub(1,1):upper() .. arg:sub(2) end end -- -- uppercases first letter, lowercases everything else -- function p.ucflc(arg) if not arg or arg:len() == 0 then return nil elseif arg:len() == 1 then return arg:upper() else return arg:sub(1,1):upper() .. arg:sub(2):lower() end end return p d69422a8379e1fcb190fe16e6d212071b9caa1dc 118 117 2024-02-10T00:57:47Z Aniceto 2 wikitext text/x-wiki <span class="nowrap">{{#iferror:{{#expr:{{{1|1}}}}} |{{#switch:{{{1}}} |fig=&#8199; |en=&ensp; |em=&emsp; |thin=&thinsp; |hair=&#8202; |&nbsp; }} |{{#invoke:String|rep|{{#switch:{{{2}}} |fig=&#8199; |en=&ensp; |em=&emsp; |thin=&thinsp; |hair=&#8202; |&nbsp; }}|{{{1|1}}}}} }}</span><noinclude> {{/doc}} </noinclude> 17efb36433f45a5c4f23528902387edcf0e174f0 Template:Nbsp/doc 10 54 119 2024-02-10T00:58:11Z Aniceto 2 Created page with "{{Documentation}} {{t|Main page/settings}} contains all the configuration for all the main page templates. Please edit this template to update the content on the main page. <includeonly> [[Category:Main page templates]] [[Category:Manual templates]] </includeonly>" wikitext text/x-wiki {{Documentation}} {{t|Main page/settings}} contains all the configuration for all the main page templates. Please edit this template to update the content on the main page. <includeonly> [[Category:Main page templates]] [[Category:Manual templates]] </includeonly> 31d9cc21769ea70d7b01f321a663770531bbdb33 Module:Paramtest 828 55 120 2024-02-10T00:58:27Z Aniceto 2 Created page with "-- Imported from: https://runescape.wiki/w/Module:Paramtest --[[ {{Helper module |name=Paramtest |fname1 = is_empty(arg) |ftype1 = String |fuse1 = Returns true if arg is not defined or contains only whitespace |fname2 = has_content(arg) |ftype2 = String |fuse2 = Returns true if arg exists and does not only contain whitespace |fname3 = default_to(arg1,arg2) |ftype3 = String, Any value |fuse3 = If arg1 exists and does not only contain whitespace, the function returns arg1..." Scribunto text/plain -- Imported from: https://runescape.wiki/w/Module:Paramtest --[[ {{Helper module |name=Paramtest |fname1 = is_empty(arg) |ftype1 = String |fuse1 = Returns true if arg is not defined or contains only whitespace |fname2 = has_content(arg) |ftype2 = String |fuse2 = Returns true if arg exists and does not only contain whitespace |fname3 = default_to(arg1,arg2) |ftype3 = String, Any value |fuse3 = If arg1 exists and does not only contain whitespace, the function returns arg1, otherwise returns arg2 |fname4 = defaults{ {arg1,arg2},...} |ftype4 = {String, Any value}... |fuse4 = Does the same as <code>default_to()</code> run over every table passed |fname5 = table_is_empty(arg) |ftype5 = Table |fuse5 = Returns true if the table has no content, it does not check if the content of the table contains anything |fname6 = table_has_content(arg) |ftype6 = Table |fuse6 = returns true if the table has content, it does not check if the content of the table contains anything }} --]] local checkType, checkTypeForNamedArg do local _libraryUtil = require("libraryUtil"); checkType = _libraryUtil.checkType; checkTypeForNamedArg = _libraryUtil.checkTypeForNamedArg; end -- -- Tests basic properties of parameters -- local p = {} -- -- Tests if the parameter is empty, all white space, or undefined -- function p.is_empty(arg) return not string.find(arg or '', '%S') end -- -- Tests if the table parameter is empty -- function p.table_is_empty(arg) for _, _ in pairs(arg) do return false end return true end -- -- Returns the parameter if it has any content, the default (2nd param) -- function p.default_to(arg, default) if string.find(arg or '', '%S') then return arg else return default end end -- -- Returns a list of paramaters if it has any content, or the default -- function p.defaults(args) checkType("defaults", 1, args, "table"); local ret = {} for i, v in ipairs(args) do checkTypeForNamedArg("defaults", i, v, "table"); ret[i] = p.default_to(v[1], v[2]); end return unpack(ret, 1, #args); end -- -- Tests if the parameter has content -- The same as !is_empty, but this is more readily clear -- function p.has_content(arg) return string.find(arg or '', '%S') end -- -- Tests if the table parameter has content -- The same as !table_is_empty, but this is more readily clear -- function p.table_has_content(arg) for _, _ in pairs(arg) do return true end return false end -- -- uppercases first letter -- function p.ucfirst(arg) if not arg or arg:len() == 0 then return nil elseif arg:len() == 1 then return arg:upper() else return arg:sub(1,1):upper() .. arg:sub(2) end end -- -- uppercases first letter, lowercases everything else -- function p.ucflc(arg) if not arg or arg:len() == 0 then return nil elseif arg:len() == 1 then return arg:upper() else return arg:sub(1,1):upper() .. arg:sub(2):lower() end end return p d69422a8379e1fcb190fe16e6d212071b9caa1dc Module:Paramtest/doc 828 56 121 2024-02-10T00:58:45Z Aniceto 2 Created page with "{{Documentation}} '''Module:Paramtest''' is a helper module to be used by other modules. See [https://runescape.wiki/w/Module:Paramtest Module:Paramtest] on RuneScape Wiki for more details." wikitext text/x-wiki {{Documentation}} '''Module:Paramtest''' is a helper module to be used by other modules. See [https://runescape.wiki/w/Module:Paramtest Module:Paramtest] on RuneScape Wiki for more details. 86d0655d24ae7382f22919a2d9c5c1ced0308312 Module:DPLlua 828 57 122 2024-02-10T00:59:46Z Aniceto 2 Created page with "-- <nowiki> local dpl = {} local libraryUtil = require( 'libraryUtil' ) local hasContent = require( 'Module:Paramtest' ).has_content local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg dpl.pipe = '¦' local dataContentMarker = '`#@@#`' local allIncludedParamNames = {} -- Custom function for splitting a string because mw.text.split() is waaay too slow local function split( str, pattern, plain ) local res = {} local con..." Scribunto text/plain -- <nowiki> local dpl = {} local libraryUtil = require( 'libraryUtil' ) local hasContent = require( 'Module:Paramtest' ).has_content local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg dpl.pipe = '¦' local dataContentMarker = '`#@@#`' local allIncludedParamNames = {} -- Custom function for splitting a string because mw.text.split() is waaay too slow local function split( str, pattern, plain ) local res = {} local continue = true local startIndex = 1 while continue do local i, j = string.find( str, pattern, startIndex, plain ) if i then table.insert( res, string.sub( str, startIndex, i-1 ) ) startIndex = j + 1 else table.insert( res, string.sub( str, startIndex ) ) continue = false end end return res end -- Also custom function for speed local function trim( str ) return (string.gsub( str, '^%s+', '' ):gsub( '%s+$', '' )) end local function mergeItem( tbl, key, item ) if type( tbl[key] ) == 'table' and type( item ) == 'table' then for k in pairs( tbl[key] ) do mergeItem( tbl[key], k, item[k] ) end elseif type( tbl[key] ) == 'table' then table.insert( tbl[key], item ) else tbl[key] = { tbl[key], item } end end local escapeChars = { ['{'] = '&#123;', ['}'] = '&#125;', ['['] = '&#91;', [']'] = '&#93;', ['|'] = '&#124;', ['-'] = '&#8208;' } local function escape( str ) return (string.gsub( str, '[{}%[%]|%-]', escapeChars )) end local unEscapeChars = { ['&#123;'] = '{', ['&#125;'] = '}', ['&#91;'] = '[', ['&#93;'] = ']', ['&#124;'] = '|', ['&#8208;'] = '-' } local function unEscape( str ) return (string.gsub( str, '&#%d+;', unEscapeChars )) end local function fixCurlyBrackets( str ) -- the \226\157\180\181 are used to match ❴ (U+2774) and ❵ (U+2775) wich are 3 bytes long (UTF-8) so -- we can't use them directly inside [] patterns. Ustring would fix this but it's way too slow. return (string.gsub( str, '\226\157[\180\181]', { ['❴'] = '{', ['❵'] = '}' } )) end local function removeFormattingSettings( query ) local toRemove = { 'mode', 'table', 'tablerow', 'tablesortcol', 'headingmode', 'headingcount', 'listattr', 'itemattr', 'hlistattr', 'hitemattr', 'userdateformat', 'shownamespace', 'escapelinks', 'titlemaxlength', 'replaceintitle', 'columns', 'rows', 'rowsize', 'rowcolformat', 'resultsheader', 'resultsfooter', 'oneresultheader', 'oneresultfooter', 'noresultsheader', 'suppresserrors', 'noresultsfooter', 'format', 'groupMultiTemplateResults' } for _, k in ipairs( toRemove ) do query[k] = nil end end local function formatInclude( query ) checkTypeForNamedArg( 'Module:DPLlua.ask', 'include', query, 'string' ) query = split( query, ',', true ) local includedParamNames = {} local sectionAttributes = {} for i = 1, #query do if query[i]:match( '%b{}' ) then -- Check if we are including a template local templateName, extra = query[i]:match( '{(.-)[¦|}](.*)' ) if hasContent( extra ) then local phantomTemplateName = extra:match( '^(.-)}' ) or extra:match( '^[./].+' ) local phantomTemplatePrefix = extra:match( '^(.-)}' ) and '' or templateName local params = extra:gsub( '^.-}', '' ):gsub( '^[./].+', '' ):gsub( ':%-', '' ) local sur = hasContent( phantomTemplateName ) and ('¦' .. phantomTemplatePrefix .. phantomTemplateName) or '' query[i] = string.format( '{%s%s}%s', templateName, sur, params ) if hasContent( phantomTemplateName ) then table.insert( includedParamNames, { name=phantomTemplatePrefix..phantomTemplateName, isTemplate=true, hasPhantomTemplate=true } ) table.insert( sectionAttributes, { hasPhantomTemplate=true } ) else for param in params:gmatch( ':([^:]*)' ) do param = trim( param ) table.insert( includedParamNames, { name=templateName, isTemplate=true, param=param } ) end table.insert( sectionAttributes, { hasPhantomTemplate=false } ) end else query[i] = string.format( '{%s¦DPLlua helper}', templateName ) -- Use a helper template to get all the parameters of our included template table.insert( includedParamNames, { name=templateName, isTemplate=true, includeAll=true } ) table.insert( sectionAttributes, { hasPhantomTemplate=false } ) end else table.insert( includedParamNames, { name=trim( query[i] ) } ) table.insert( sectionAttributes, { hasPhantomTemplate=false } ) end end return table.concat( query, ',' ), includedParamNames, sectionAttributes end local function formatDpl( query ) local queries = {} local count = query.count or 500 local offset = query.offset or 0 local usesInclude = false local includedParamNames = {} local sectionAttributes query.count = nil query.offset = nil -- Use table format so we can place dataContentMarkers around each included parameter. The secseparator -- is needed to add dataContentMarkers when a phantom template is used local dplStringInclude = [=[ {{#dpl: |noresultsheader=@@ |count=%s |offset=%s |%s |table=, |listseparators=,\n¦-\n¦[[%%PAGE%%¦]],, |tablerow=%s |secseparators=%s }}]=] -- Table format requires an include statement so we use format instead. -- This is also a lot faster than adding an empty include statement local dplStringNoInclude = [=[ {{#dpl: |noresultsheader=@@ |count=%s |offset=%s |%s |format=,¦-¦[[%%PAGE%%¦]],, }}]=] -- Auto generate more than one dpl if count > 500 -- The results of these are later combined for i = 1, math.ceil( count / 500 ) do local params = {} for k, v in pairs( query ) do if k == 'include' then v, includedParamNames, sectionAttributes = formatInclude( v ) usesInclude = true end if type( v ) == 'table' then for _, x in ipairs( v ) do table.insert( params, k .. '=' .. tostring( x ):gsub( '|', '¦' ) ) end else table.insert( params, k .. '=' .. tostring( v ):gsub( '|', '¦' ) ) end end if usesInclude then local secseparators = '' for _, v in ipairs( sectionAttributes ) do if v.hasPhantomTemplate then -- Phantom templates need this because they ignore tablerow formatting secseparators = secseparators .. '¶¦' .. dataContentMarker .. ',' .. dataContentMarker .. ',' else secseparators = secseparators .. '¶¦,,' end end table.insert( queries, string.format( dplStringInclude, count > 500 and 500 or count, offset, table.concat( params, '\n|' ), string.rep( dataContentMarker..'%%'..dataContentMarker..',', #includedParamNames ), secseparators ) ) else table.insert( queries, string.format( dplStringNoInclude, count > 500 and 500 or count, offset, table.concat( params, '\n|' ) ) ) end count = count - 500 offset = offset + 500 end table.insert( allIncludedParamNames, includedParamNames ) return table.concat( queries ) end local function toTable( query, groupMultiTemplateResults ) local includedParamNames = table.remove( allIncludedParamNames, 1 ) local usesInclude = #includedParamNames > 0 local res = {} query = query:gsub( '<p>Extension:DynamicPageList .-</p>', function(item) res.error = item; return '' end ) if query:find( '^@@' ) then -- @@ is used when no result is found return res end if usesInclude then query = query:gsub( dataContentMarker..'(.-)'..dataContentMarker, escape ) end query = trim( query ) query = split( query, '|-', true ) -- Results of the returned pages are separated by |- for _, v in ipairs( query ) do if hasContent( v ) and not v:find( '^@@' ) then v = trim( v ) local title = v:match( '^|%[%[(.-)|' ) local rawDataList = v:match( '^|.-|.-|(.*)' ) -- This is everything after the title if not usesInclude then if title and title ~= '' then table.insert( res, title ) end else -- When multiple includes are used (e.g. include={Template1},{Template2} or include={Template}:1:2) their results are separated by a pipe rawDataList = split( rawDataList, '|', true ) local cleanedDataList = {} for _incIndex, dataItem in ipairs( rawDataList ) do local incIndex = ((_incIndex - 1) % #includedParamNames) + 1 -- Needed in case the same template appears multiple times on the same page dataItem = unEscape( dataItem ) dataItem = trim( dataItem ) if includedParamNames[ incIndex ].isTemplate and includedParamNames[ incIndex ].includeAll then -- Check if we included a full template -- When we include an entire template we use the %ARGS% parameter supplied by dpl. -- However all | characters are repaced with §, e.g.: -- §namelessParam -- §param = text [[wowee§link text]] -- §param2 = text {{something§something else}} dataItem = dataItem:gsub( '\127\'"`UNIQ%-%-nowiki%-%x+%-QINU`"\'\127', function(item) return '<nowiki>' .. item .. '</nowiki>' end ) dataItem = mw.text.unstripNoWiki( dataItem ) -- Unstrip nowiki so we can clean their content dataItem = fixCurlyBrackets( dataItem ) -- When using the %ARGS% dpl parameter, curly brackets are replaced with ❴ (U+2774) and ❵ (U+2775) dataItem = dataItem:gsub( '%b{}', function(x) return x:gsub( '§', '|' ) end ) -- Restore pipe characters inside links and templates dataItem = dataItem:gsub( '%b[]', function(x) return x:gsub( '§', '|' ) end ) dataItem = dataItem:gsub( '<nowiki>(.-)</nowiki>', function(x) return mw.getCurrentFrame():extensionTag( 'nowiki', x ) end ) -- Restrip nowiki local _dataItem = {} if dataItem ~= '' then dataItem = split( dataItem:sub( 3 ), '§' ) -- The sub(3) removes the first § at the start. § is 2 bytes wide so start at index 3 for i, item in ipairs( dataItem ) do if item:find( '=' ) then -- Check if the parameter is named or unnamed local param, value = item:match( '^%s*(.-)%s*=%s*(.-)%s*$' ) _dataItem[ param ] = value else table.insert( _dataItem, trim( item ) ) end end end dataItem = _dataItem end local dataListIndex = groupMultiTemplateResults and 1 or math.ceil( _incIndex / #includedParamNames ) if includedParamNames[ incIndex ].isTemplate and not includedParamNames[ incIndex ].includeAll and not includedParamNames[ incIndex ].hasPhantomTemplate then -- This means there was an include in the form 'include = {template}:param' local templateName = includedParamNames[ incIndex ].name local paramName = includedParamNames[ incIndex ].param paramName = tonumber( paramName ) or paramName -- Keep as string if tonumber fails cleanedDataList[ dataListIndex ] = cleanedDataList[ dataListIndex ] or {} cleanedDataList[ dataListIndex ][ templateName ] = cleanedDataList[ dataListIndex ][ templateName ] or {} if groupMultiTemplateResults and _incIndex > #includedParamNames then mergeItem( cleanedDataList[ dataListIndex ][ templateName ], paramName, dataItem ) else cleanedDataList[ dataListIndex ][ templateName ][ paramName ] = dataItem end else local templateName = includedParamNames[ incIndex ].name cleanedDataList[ dataListIndex ] = cleanedDataList[ dataListIndex ] or {} if groupMultiTemplateResults and _incIndex > #includedParamNames then mergeItem( cleanedDataList[ dataListIndex ], templateName, dataItem ) else cleanedDataList[ dataListIndex ][ templateName ] = dataItem end end end if title and title ~= '' then for _, v in ipairs( cleanedDataList ) do table.insert( res, { title=title, include=v } ) end end end end end return res end -- Accepts a series of tables each containig the settings for a dpl query. -- Combinig multiple dpl queries yields better performance than doing them sequentially function dpl.ask( ... ) local formatTime = os.clock() local queries = { ... } local wantsGrouping = {} for i = 1, #queries do checkType( 'Module:DPLlua.ask', i, queries[i], 'table' ) table.insert( wantsGrouping, queries[i].groupMultiTemplateResults or false ) removeFormattingSettings( queries[i] ) queries[i] = formatDpl( queries[i] ) end formatTime = os.clock() - formatTime local DPLtime = os.clock() queries = table.concat( queries, '$@µ@$' ) queries = mw.getCurrentFrame():preprocess( queries ) queries = split( queries, '$@µ@$', true ) DPLtime = os.clock() - DPLtime for i = 1, #queries do local parseTime = os.clock() queries[i] = toTable( queries[i], wantsGrouping[i] ) parseTime = os.clock() - parseTime queries[i]['DPL time'] = DPLtime queries[i]['Parse time'] = math.floor( (formatTime + parseTime) * 1e5 ) / 1e5 -- os.clock() has a resolution of 10µs end return unpack( queries ) end -- function dpl.test() -- local time = os.clock() -- local a, b = dpl.ask({ -- namespace = 'Module', -- linksto = 'Module:Chart data', -- distinct = 'strict', -- ordermethod = 'title', -- nottitlematch = '%/doc¦%sandbox%¦Exchange/%¦Exchange historical/%¦Chart data', -- ignorecase = 'true', -- allowcachedresults = false -- },{ -- namespace = 'Module', -- linksto = 'Module:Enum', -- distinct = 'strict', -- ordermethod = 'title', -- nottitlematch = '%/doc¦%sandbox%¦Exchange/%¦Exchange historical/%¦Enum', -- ignorecase = 'true', -- allowcachedresults = false -- }) -- mw.logObject(a) -- mw.logObject(b) -- local a, b = dpl.ask({ -- namespace = 'Module', -- linksto = 'Module:Chart data', -- distinct = 'strict', -- ordermethod = 'title', -- nottitlematch = '%/doc¦%sandbox%¦Exchange/%¦Exchange historical/%¦Chart data', -- ignorecase = 'true', -- allowcachedresults = false -- },{ -- namespace = '', -- ignorecase = 'true', -- uses = 'Template:Infobox Recipe', -- count = 50, -- include = '{Infobox Recipe},{Infobox Item}', -- allowcachedresults = false -- }) -- mw.logObject(a) -- mw.logObject(b) -- local a = dpl.ask{ -- namespace = '', -- uses = 'Template:Infobox Recipe', -- include = '{Infobox Recipe}:skill:name,{Infobox Item}:update,{Infobox Item|test}', -- count = 50, -- ordermethod = 'title', -- } -- mw.logObject(a) -- local q = dpl.ask{ -- uses = "Template:Collections table", -- category = "Archaeology collections", -- -- include = "{Infobox collection}:reward,{Collections table}:1:2:3:4:5:6:7:8:9:10:11:12:13:14:15", -- include = "{Infobox collection}:reward,{Collections table}", -- count = 100 -- } -- mw.logObject(q) -- local q = dpl.ask{ -- namespace = "", -- uses = "Template:Infobox spell", -- notcategory = {"Removed content", "Removed spells"}, -- nottitlematch = {"Enchant Crossbow Bolt", "Storm of Armadyl"}, -- include = "{Infobox spell}", -- } -- mw.logObject(q) -- local list = dpl.ask{ -- namespace = 'Template', -- uses = 'Template:Navbox', -- ordermethod = 'title', -- include = '{Navbox}:gtitle1:gtitle2', -- count = 1, -- offset = 3 -- } -- mw.logObject(list) -- local list = dpl.ask{ -- namespace = 'User', -- titlematch = 'CephHunter/Sandbox/test1', -- include = '{User:CephHunter/Sandbox/test2|User:CephHunter/Sandbox/test3},{User:CephHunter/Sandbox/test3}:1', -- } -- mw.logObject(list) -- mw.logObject(dpl.ask{ -- namespace = 'User', -- ignorecase = 'true', -- titlematch = 'CephHunter/Sandbox/test1', -- include = '{User:CephHunter/Sandbox/test2}' -- }) -- mw.logObject(dpl.ask{ -- namespace = 'Module', -- uses = 'Template:Helper module', -- titlematch = '%/doc', -- nottitlematch = 'Exchange/%|Exchange historical/%|Sandbox/%', -- ordermethod = 'title', -- include = '{Helper module}, {Helper module}:example', -- count = 1, -- offset = 13 -- }) -- mw.logObject(dpl.ask{ -- namespace = 'Module', -- titlematch = 'Chart data|Absorbative calculator', -- nottitlematch = 'Exchange/%|Exchange historical/%|Sandbox/%|%/doc|DPLlua%', -- ordermethod = 'title', -- include = '%0' -- }) -- mw.logObject(dpl.ask{ -- uses = 'Template:Collections table', -- include = '{Collections table}', -- count = 5 -- }) -- mw.log(os.clock()-time) -- end return dpl -- </nowiki> a4585a9ed619b57adfaa5cf8d9279da529e74df5 Module:DPLlua/doc 828 58 123 2024-02-10T01:00:23Z Aniceto 2 Created page with "{{Documentation}} '''Module:DPLlua''' uses [[Template:DPLlua helper]] to make it possible to include all parameters of a template while maintaining good performance. See [https://runescape.wiki/w/Module:DPLlua Module:DPLlua] on RuneScape Wiki for more details." wikitext text/x-wiki {{Documentation}} '''Module:DPLlua''' uses [[Template:DPLlua helper]] to make it possible to include all parameters of a template while maintaining good performance. See [https://runescape.wiki/w/Module:DPLlua Module:DPLlua] on RuneScape Wiki for more details. 6eae15c25a78cdd450872613b173ec81997541c0 Template:DPLlua helper 10 59 124 2024-02-10T01:00:47Z Aniceto 2 Created page with "<includeonly>`#@@#`{{{%ARGS%|}}}`#@@#`</includeonly><noinclude>{{/doc}}</noinclude>" wikitext text/x-wiki <includeonly>`#@@#`{{{%ARGS%|}}}`#@@#`</includeonly><noinclude>{{/doc}}</noinclude> c6dc2adce3191941b5002bac765aedef04ed6f84 Template:DPLlua helper/doc 10 60 125 2024-02-10T01:01:05Z Aniceto 2 Created page with "{{Documentation}} '''Template:DPLlua helper''' is a helper template for [[Module:DPLlua]] to make it possible to include all parameters of a template while maintaining good performance. This template is not meant to be used on content pages." wikitext text/x-wiki {{Documentation}} '''Template:DPLlua helper''' is a helper template for [[Module:DPLlua]] to make it possible to include all parameters of a template while maintaining good performance. This template is not meant to be used on content pages. 797f13a78a5c135cb57d9e18b2392b041755a78c Module:User error 828 61 126 2024-02-10T01:02:16Z Aniceto 2 Created page with "-------------------------------------------------------------------------------- -- A less intimidating version of the built-in "error()" function, to help -- editors fix their mistakes when transcluding a template. -- -- @see [[wikia:w:c:Dev:Module:User error]] for a similar module. -------------------------------------------------------------------------------- local checkType = require("libraryUtil").checkType; return function (message, ...) checkType("Module:User..." Scribunto text/plain -------------------------------------------------------------------------------- -- A less intimidating version of the built-in "error()" function, to help -- editors fix their mistakes when transcluding a template. -- -- @see [[wikia:w:c:Dev:Module:User error]] for a similar module. -------------------------------------------------------------------------------- local checkType = require("libraryUtil").checkType; return function (message, ...) checkType("Module:User error", 1, message, "string"); local result = mw.text.tag( "strong", { class="error" }, "Error: " .. message ); local categories = {}; for i = 1, select("#", ...) do local category = select(i, ...); checkType("Module:User error", 1 + i, category, "string", true); if (category and category ~= "") then table.insert(categories, "[[Category:" .. category .. "]]"); end end return result .. table.concat(categories); end; a4101fc46477bcd3c5dd899b157bf34b216d820f Module:User error/doc 828 62 127 2024-02-10T01:03:03Z Aniceto 2 Created page with "{{Documentation}} A less intimidating version of the built-in <syntaxhighlight inline lang="lua">error(...)</syntaxhighlight> function, to help editors fix their mistakes when transcluding a template." wikitext text/x-wiki {{Documentation}} A less intimidating version of the built-in <syntaxhighlight inline lang="lua">error(...)</syntaxhighlight> function, to help editors fix their mistakes when transcluding a template. 8c3003e8d2e35ac6da8ebe9adf0d9d4e7c58f5fb Module:Hatnote 828 63 128 2024-02-10T01:04:24Z Aniceto 2 Created page with "-------------------------------------------------------------------------------- -- Module:Hatnote -- -- -- -- This module produces hatnote links and links to related articles. It -- -- implements the {{hatnote}} and {{format link}} meta-templates and includes -- -- helper functions for other Lua hatnote modules...." Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote -- -- -- -- This module produces hatnote links and links to related articles. It -- -- implements the {{hatnote}} and {{format link}} meta-templates and includes -- -- helper functions for other Lua hatnote modules. -- -------------------------------------------------------------------------------- local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local mArguments -- lazily initialise [[Module:Arguments]] local yesno -- lazily initialise [[Module:Yesno]] local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end function p.defaultClasses(inline) -- Provides the default hatnote classes as a space-separated string; useful -- for hatnote-manipulation modules like [[Module:Hatnote group]]. return (inline == 1 and 'hatnote-inline' or 'hatnote') .. ' ' .. 'navigation-not-searchable' end function p.disambiguate(page, disambiguator) -- Formats a page title with a disambiguation parenthetical, -- i.e. "Example" → "Example (disambiguation)". checkType('disambiguate', 1, page, 'string') checkType('disambiguate', 2, disambiguator, 'string', true) disambiguator = disambiguator or 'disambiguation' return mw.ustring.format('%s (%s)', page, disambiguator) end function p.findNamespaceId(link, removeColon) -- Finds the namespace id (namespace number) of a link or a pagename. This -- function will not work if the link is enclosed in double brackets. Colons -- are trimmed from the start of the link by default. To skip colon -- trimming, set the removeColon parameter to false. checkType('findNamespaceId', 1, link, 'string') checkType('findNamespaceId', 2, removeColon, 'boolean', true) if removeColon ~= false then link = removeInitialColon(link) end local namespace = link:match('^(.-):') if namespace then local nsTable = mw.site.namespaces[namespace] if nsTable then return nsTable.id end end return 0 end function p.makeWikitextError(msg, helpLink, addTrackingCategory, title) -- Formats an error message to be returned to wikitext. If -- addTrackingCategory is not false after being returned from -- [[Module:Yesno]], and if we are not on a talk page, a tracking category -- is added. checkType('makeWikitextError', 1, msg, 'string') checkType('makeWikitextError', 2, helpLink, 'string', true) yesno = require('Module:Yesno') title = title or mw.title.getCurrentTitle() -- Make the help link text. local helpText if helpLink then helpText = ' ([[' .. helpLink .. '|help]])' else helpText = '' end -- Make the category text. local category if not title.isTalkPage -- Don't categorise talk pages and title.namespace ~= 2 -- Don't categorise userspace and yesno(addTrackingCategory) ~= false -- Allow opting out then category = 'Hatnote templates with errors' category = mw.ustring.format( '[[%s:%s]]', mw.site.namespaces[14].name, category ) else category = '' end return mw.ustring.format( '<strong class="error">Error: %s%s.</strong>%s', msg, helpText, category ) end local curNs = mw.title.getCurrentTitle().namespace p.missingTargetCat = --Default missing target category, exported for use in related modules ((curNs == 0) or (curNs == 14)) and 'Articles with hatnote templates targeting a nonexistent page' or nil function p.quote(title) --Wraps titles in quotation marks. If the title starts/ends with a quotation --mark, kerns that side as with {{-'}} local quotationMarks = { ["'"]=true, ['"']=true, ['“']=true, ["‘"]=true, ['”']=true, ["’"]=true } local quoteLeft, quoteRight = -- Test if start/end are quotation marks quotationMarks[string.sub(title, 1, 1)], quotationMarks[string.sub(title, -1, -1)] if quoteLeft or quoteRight then title = mw.html.create("span"):wikitext(title) end if quoteLeft then title:css("padding-left", "0.15em") end if quoteRight then title:css("padding-right", "0.15em") end return '"' .. tostring(title) .. '"' end -------------------------------------------------------------------------------- -- Hatnote -- -- Produces standard hatnote text. Implements the {{hatnote}} template. -------------------------------------------------------------------------------- local function decorateHatnote(hatnote, options) local function getIcon(filename) local html = '' if type(filename) == 'string' then local icon = mw.html.create('span') icon :addClass('hatnote-icon') :addClass('metadata') :wikitext('[[File:' .. filename .. '|14px|link=]]') :done() html = tostring(icon) end return html end local container = mw.html.create('div') container :addClass('hatnote-container') :wikitext(getIcon(options.icon)) :wikitext(tostring(hatnote)) :done() return container end function p.hatnote(frame) local args = getArgs(frame) local s = args[1] if not s then return p.makeWikitextError( 'no text specified', 'Template:Hatnote#Errors', args.category ) end return p._hatnote(s, { extraclasses = args.extraclasses, selfref = args.selfref }) end function p._hatnote(s, options) checkType('_hatnote', 1, s, 'string') checkType('_hatnote', 2, options, 'table', true) options = options or {} local inline = options.inline local hatnote = mw.html.create(inline == 1 and 'span' or 'div') local extraclasses if type(options.extraclasses) == 'string' then extraclasses = options.extraclasses end hatnote :attr('role', 'note') :addClass(p.defaultClasses(inline)) :addClass(extraclasses) :addClass(options.selfref and 'selfref' or nil) :wikitext(s) -- Decorate WP hatnote to SCW standard hatnote = decorateHatnote(hatnote, options) return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Hatnote/styles.css' } } .. tostring(hatnote) end return p 7e322cb6950c0f36959bceccc679cc8f52959f7c Module:Hatnote/doc 828 64 129 2024-02-10T01:04:47Z Aniceto 2 Created page with "{{Documentation|scwShared=true|fromWikipedia=true}} '''Module:Hatnote''' is a meta-module that provides various functions for making hatnotes. It implements the {{tl|hatnote}} template, for use in hatnotes at the top of pages, and the {{tl|format link}} template, which is used to format a wikilink for use in hatnotes. It also contains a number of helper functions for use in other Lua hatnote modules." wikitext text/x-wiki {{Documentation|scwShared=true|fromWikipedia=true}} '''Module:Hatnote''' is a meta-module that provides various functions for making hatnotes. It implements the {{tl|hatnote}} template, for use in hatnotes at the top of pages, and the {{tl|format link}} template, which is used to format a wikilink for use in hatnotes. It also contains a number of helper functions for use in other Lua hatnote modules. c5ade72ea380c6b78b931f550fd777df1d2d60da Template:Tl 10 65 130 2024-02-10T01:05:33Z Aniceto 2 Created page with "{{{{{|safesubst:}}}#Invoke:Template link general|main}}<noinclude> {{/doc}} </noinclude>" wikitext text/x-wiki {{{{{|safesubst:}}}#Invoke:Template link general|main}}<noinclude> {{/doc}} </noinclude> 66bd000b27dc95df42568346c185334f805221b0 Template:Tl/doc 10 66 131 2024-02-10T01:06:17Z Aniceto 2 Created page with "{{Documentation}} {{Wikipedia template}} {{tsh|{{{1|tlg}}}|{{{2|}}}}} This template, often abbreviated as {{tlf|{{#switch:{{lc:{{ROOTPAGENAME}}}} | tlg | template link general = tlg | tlb | template link with bold = tlb | tlc | template link code = tlc | tlw ||template link with linked braces = tlw | tlf | template link with link off = tlf | tltss | template link with title span, subst = tltss | tlx | template link expanded = tlx | tlxb | template link expanded with bo..." wikitext text/x-wiki {{Documentation}} {{Wikipedia template}} {{tsh|{{{1|tlg}}}|{{{2|}}}}} This template, often abbreviated as {{tlf|{{#switch:{{lc:{{ROOTPAGENAME}}}} | tlg | template link general = tlg | tlb | template link with bold = tlb | tlc | template link code = tlc | tlw ||template link with linked braces = tlw | tlf | template link with link off = tlf | tltss | template link with title span, subst = tltss | tlx | template link expanded = tlx | tlxb | template link expanded with bold = tlxb | tlxi | template link expanded with italic = tlxi | tlxs | template link expanded with subst = tlxs | tls | template link with subst = tls | tnull | template link null = tnull | tlp | template link with parameters = tlp}} }}, is used to provide stylized formatting to template displays without actually using the template itself. ===Parameters=== With the exception of {{mono|alttext}}, the named parameters are toggles that are either omitted (default in most cases) or activated (by being assigned a value such as "on", "yes", "true", "include", etc.). They may be included in any order ([[#Examples|see Examples below]]). Certain templates have the parameter "on" by default; see [[#General-purpose formatting|the main table]] for all alternate options. {| class="wikitable" ! Parameter || Action || Use with<br>{{t|example}} || Default active |- | || Default (without accessory parameters) || {{tlg|example}} || |- | brace || Include braces as part of the template link || {{tlg|brace=yes|example}} || {{tl|tlw}}/{{tl|tn}} |- | braceinside || Include innermost braces as part of the template link || {{tlg|example|braceinside=yes}} || |- | bold || Renders the template link/name in '''bold''' || {{tlg|bold=yes|example}} || {{tl|tlb}}, {{tl|tlxb}} |- | code || Display output using HTML [[HTML element#code|{{tag|code}}]] tags ([[monospaced font]]) || {{tlg|code=yes|example}} || {{tl|tlc}}, {{tl|Template link expanded}}, etc. |- | italic || Display any parameters accompanying the template link/name in ''italics'' ||| {{tlg|italic=yes|example|param}} || {{tl|tlxi}} |- | kbd || Display output using HTML [[HTML element#kbd|{{tag|kbd}}]] tags (monospaced font) || {{tlg|kbd=yes|example}} || |- | nolink || Don't render the template name as a link || {{tlg|nolink=yes|example}} || {{tl|tlf}}, {{t|tnull}} |- | nowrap || Prevent the insertion of line breaks ([[word wrap]]) in the output || {{tlg|nowrap=yes|example}} || |- | nowrapname || Prevent word wrapping in the output of template name/link (parameters will wrap if needed) || {{tlg|nowrapname=yes|example}} || |- | plaincode || Uses {{tag|code|params=style="border:none; background:transparent;"}} || {{tlg|plaincode=yes|example}} || {{tl|tltss}} |- | subst || Include a [[Help:Substitution|subst:]] prefix before the template link/name || {{tlg|subst=yes|example}} || {{tl|tls}}, {{tl|tlxs}}, etc |- | {{para|alttext|[text]}} || Use [text] as the label for the template link || {{tlg|alttext=Other|example}} || {{tl|tla}} |- | _show_result || Will also display the result of the template. || {{tlx|Min|7|-5|_show_result=y}} || |- | _expand || Will add a link to the expanded template page. || {{tlx|Min|7|-5|_expand=y}} || |} <includeonly> <!-- Category --> [[Category:Internal link templates]] [[Category:Typing-aid templates]] </includeonly> bcc8a8da870e76ae70ee2fba3a921a6b991dff36 Template:Time ago 10 67 132 2024-02-10T01:07:23Z Aniceto 2 Created page with "{{#invoke:Time ago|main}}<noinclude>{{/doc}}</noinclude>" wikitext text/x-wiki {{#invoke:Time ago|main}}<noinclude>{{/doc}}</noinclude> e8c4a26b0d1afeb3d2c15dec6b579e5bfa2db894 Template:Time ago/doc 10 68 133 2024-02-10T01:07:44Z Aniceto 2 Created page with "{{Documentation}} {{Wikipedia template}} The '''Time ago''' template calculates the amount of time which has passed since a provided timestamp. The result is a string similar to one of the examples below. This template ''should not'' be used with "subst" unless you don't want the stamp to change as the user refreshes the page. The result is rounded down. "Month" is defined as 31 days. ;Usage * <code><nowiki>{{</nowiki>'''Time ago'''|''timestamp''<nowiki>}}</nowiki><..." wikitext text/x-wiki {{Documentation}} {{Wikipedia template}} The '''Time ago''' template calculates the amount of time which has passed since a provided timestamp. The result is a string similar to one of the examples below. This template ''should not'' be used with "subst" unless you don't want the stamp to change as the user refreshes the page. The result is rounded down. "Month" is defined as 31 days. ;Usage * <code><nowiki>{{</nowiki>'''Time ago'''|''timestamp''<nowiki>}}</nowiki></code> The timestamp can be almost any solid, readable format but to avoid ambiguity mistakes, one of the styles below is preferred. * <code>magnitude</code> parameter can be set to explicitly use certain unit. Allowed values are: <code>seconds</code>, <code>minutes</code>, <code>hours</code>, <code>days</code>, <code>weeks</code>, <code>months</code> and <code>years</code>. * <code>min_magnitude</code> parameter can be set to use the specified unit or bigger units. Allowed values are: <code>seconds</code>, <code>minutes</code>, <code>hours</code>, <code>days</code>, <code>months</code> and <code>years</code>. * <code>ago</code> parameter can be set to override the default usage of the text "<code>ago</code>". ;Examples * <tt><nowiki>{{Time ago| -83 minutes}}</nowiki></tt> → '''{{Time ago|-83 minutes}}''' * <tt><nowiki>{{Time ago| -334 minutes}}</nowiki></tt> → '''{{Time ago|-334 minutes}}''' * <tt><nowiki>{{Time ago|{{REVISIONTIMESTAMP}}}}</nowiki></tt> → '''{{Time ago|{{REVISIONTIMESTAMP}}}}''' * <tt><nowiki>{{Time ago| Jan 21, 2001 3:45 PM}}</nowiki></tt> → '''{{Time ago|Jan 21 2001 3:45 PM}}''' * <tt><nowiki>{{Time ago| Nov 6 2008}}</nowiki></tt> → '''{{Time ago|Nov 6 2008}}''' * <tt><nowiki>{{Time ago| Nov 6 2008|magnitude=weeks}}</nowiki></tt> → '''{{Time ago| Nov 6 2008|magnitude=weeks}}''' * <tt><nowiki>{{Time ago| Nov 6 2008|min_magnitude=days}}</nowiki></tt> → '''{{Time ago|Nov 6 2008|min_magnitude=days}}''' * <tt><nowiki>{{Time ago| Nov 6 2008|min_magnitude=years}}</nowiki></tt> → '''{{Time ago|Nov 6 2008|min_magnitude=years}}''' * <tt><nowiki>{{Time ago| Nov 6 2008|ago=in the past}}</nowiki></tt> → '''{{Time ago|Nov 6 2008|ago=in the past}}''' * <tt><nowiki>{{Time ago| Nov 6 2008|purge=yes}}</nowiki></tt> → '''{{Time ago|Nov 6 2008|purge=yes}}''' * <tt><nowiki>{{Time ago| Nov 6 2008|purge=x}}</nowiki></tt> → '''{{Time ago|Nov 6 2008|purge=x}}''' <includeonly>[[Category:Mathematical function templates]]</includeonly><noinclude></noinclude> ee4a099afd5ecd658dafe211c2720fa6d6d0bed0 Module:Time ago 828 69 134 2024-02-10T01:08:14Z Aniceto 2 Created page with "-- Implement [[Template:Time ago]] local numberSpell, yesno -- lazy load function numberSpell(arg) numberSpell = require('Module:NumberSpell')._main return numberSpell(arg) end function yesno(arg) yesno = require('Module:Yesno') return yesno(arg) end local p = {} -- Table to convert entered text values to numeric values. local timeText = { ['seconds'] = 1, ['minutes'] = 60, ['hours'] = 3600, ['days'] = 86400, ['weeks'] = 604800, ['months'] = 2629800, --..." Scribunto text/plain -- Implement [[Template:Time ago]] local numberSpell, yesno -- lazy load function numberSpell(arg) numberSpell = require('Module:NumberSpell')._main return numberSpell(arg) end function yesno(arg) yesno = require('Module:Yesno') return yesno(arg) end local p = {} -- Table to convert entered text values to numeric values. local timeText = { ['seconds'] = 1, ['minutes'] = 60, ['hours'] = 3600, ['days'] = 86400, ['weeks'] = 604800, ['months'] = 2629800, -- 365.25 * 24 * 60 * 60 / 12 ['years'] = 31557600 } -- Table containing tables of possible units to use in output. local timeUnits = { [1] = { 'second', 'seconds', "second's", "seconds'" }, [60] = { 'minute', 'minutes', "minutes'", "minutes'" }, [3600] = { 'hour', 'hours', "hour's", "hours'" }, [86400] = { 'day', 'days', "day's", "days'" }, [604800] = { 'week', 'weeks', "week's", "weeks'", unit = 'w' }, [2629800] = { 'month', 'months', "month's", "months'", unit = 'm' }, [31557600] = { 'year', 'years', "year's", "years'", unit = 'y' } } function p._main( args ) -- Initialize variables local lang = mw.language.getContentLanguage() local auto_magnitude_num local min_magnitude_num local magnitude = args.magnitude local min_magnitude = args.min_magnitude local purge = args.purge -- Add a purge link if something (usually "yes") is entered into the purge parameter if purge then purge = ' <span class="plainlinks">([' .. mw.title.getCurrentTitle():fullUrl('action=purge') .. ' purge])</span>' else purge = '' end -- Check that the entered timestamp is valid. If it isn't, then give an error message. local success, inputTime = pcall( lang.formatDate, lang, 'xnU', args[1] ) if not success then return '<strong class="error">Error: first parameter cannot be parsed as a date or time.</strong>' end -- Store the difference between the current time and the inputted time, as well as its absolute value. local timeDiff = lang:formatDate( 'xnU' ) - inputTime local absTimeDiff = math.abs( timeDiff ) if magnitude then auto_magnitude_num = 0 min_magnitude_num = timeText[magnitude] else -- Calculate the appropriate unit of time if it was not specified as an argument. local autoMagnitudeData = { { factor = 2, amn = 31557600 }, { factor = 2, amn = 2629800 }, { factor = 2, amn = 86400 }, { factor = 2, amn = 3600 }, { factor = 2, amn = 60 } } for _, t in ipairs( autoMagnitudeData ) do if absTimeDiff / t.amn >= t.factor then auto_magnitude_num = t.amn break end end auto_magnitude_num = auto_magnitude_num or 1 if min_magnitude then min_magnitude_num = timeText[min_magnitude] else min_magnitude_num = -1 end end if not min_magnitude_num then -- Default to seconds if an invalid magnitude is entered. min_magnitude_num = 1 end local result_num local magnitude_num = math.max( min_magnitude_num, auto_magnitude_num ) local unit = timeUnits[magnitude_num].unit if unit and absTimeDiff >= 864000 then local Date = require('Module:Date')._Date local input = lang:formatDate('Y-m-d H:i:s', args[1]) -- Date needs a clean date input = Date(input) if input then local id if input.hour == 0 and input.minute == 0 then id = 'currentdate' else id = 'currentdatetime' end result_num = (Date(id) - input):age(unit) end end result_num = result_num or math.floor ( absTimeDiff / magnitude_num ) local punctuation_key, suffix if timeDiff >= 0 then -- Past if result_num == 1 then punctuation_key = 1 else punctuation_key = 2 end if args.ago == '' then suffix = '' else suffix = ' ' .. (args.ago or 'ago') end else -- Future if args.ago == '' then suffix = '' if result_num == 1 then punctuation_key = 1 else punctuation_key = 2 end else suffix = ' time' if result_num == 1 then punctuation_key = 3 else punctuation_key = 4 end end end local result_unit = timeUnits[ magnitude_num ][ punctuation_key ] -- Convert numerals to words if appropriate. local spell_out = args.spellout local spell_out_max = tonumber(args.spelloutmax) local result_num_text if spell_out and ( ( spell_out == 'auto' and 1 <= result_num and result_num <= 9 and result_num <= ( spell_out_max or 9 ) ) or ( yesno( spell_out ) and 1 <= result_num and result_num <= 100 and result_num <= ( spell_out_max or 100 ) ) ) then result_num_text = numberSpell( result_num ) else result_num_text = tostring( result_num ) end -- numeric or string local numeric_out = args.numeric local result = "" if numeric_out then result = tostring( result_num ) else result = result_num_text .. ' ' .. result_unit .. suffix -- Spaces for suffix have been added in earlier. end return result .. purge end function p.main( frame ) local args = require( 'Module:Arguments' ).getArgs( frame, { valueFunc = function( k, v ) if v then v = v:match( '^%s*(.-)%s*$' ) -- Trim whitespace. if k == 'ago' or v ~= '' then return v end end return nil end, wrappers = 'Template:Time ago' }) return p._main( args ) end return p d5309383cbe3d8c0b4e2f11cd02263496759343c Module:Time ago/doc 828 70 135 2024-02-10T01:08:30Z Aniceto 2 Created page with "{{Documentation}} {{Wikipedia template}} '''Module:Time ago''' implements the {{tl|Time ago}} template." wikitext text/x-wiki {{Documentation}} {{Wikipedia template}} '''Module:Time ago''' implements the {{tl|Time ago}} template. 73aad7a3fe3456edbf6e81940a5932f988e04ba6 Module:Template link general 828 71 136 2024-02-10T01:09:11Z Aniceto 2 Created page with "-- This implements Template:Tlg local getArgs = require('Module:Arguments').getArgs local p = {} -- Is a string non-empty? local function _ne(s) return s ~= nil and s ~= "" end local nw = mw.text.nowiki local function addTemplate(s) local i, _ = s:find(':', 1, true) if i == nil then return 'Template:' .. s end local ns = s:sub(1, i - 1) if ns == '' or mw.site.namespaces[ns] then return s else return 'Template:' .. s end end local function trimTemplate(..." Scribunto text/plain -- This implements Template:Tlg local getArgs = require('Module:Arguments').getArgs local p = {} -- Is a string non-empty? local function _ne(s) return s ~= nil and s ~= "" end local nw = mw.text.nowiki local function addTemplate(s) local i, _ = s:find(':', 1, true) if i == nil then return 'Template:' .. s end local ns = s:sub(1, i - 1) if ns == '' or mw.site.namespaces[ns] then return s else return 'Template:' .. s end end local function trimTemplate(s) local needle = 'template:' if s:sub(1, needle:len()):lower() == needle then return s:sub(needle:len() + 1) else return s end end local function linkTitle(args) if _ne(args.nolink) then return args['1'] end local titleObj local titlePart = '[[' if args['1'] then -- This handles :Page and other NS titleObj = mw.title.new(args['1'], 'Template') else titleObj = mw.title.getCurrentTitle() end titlePart = titlePart .. (titleObj ~= nil and titleObj.fullText or addTemplate(args['1'])) local textPart = args.alttext if not _ne(textPart) then if titleObj ~= nil then textPart = titleObj:inNamespace("Template") and args['1'] or titleObj.fullText else -- redlink textPart = args['1'] end end if _ne(args.subst) then -- HACK: the ns thing above is probably broken textPart = 'subst:' .. textPart end if _ne(args.brace) then textPart = nw('{{') .. textPart .. nw('}}') elseif _ne(args.braceinside) then textPart = nw('{') .. textPart .. nw('}') end titlePart = titlePart .. '|' .. textPart .. ']]' if _ne(args.braceinside) then titlePart = nw('{') .. titlePart .. nw('}') end return titlePart end function p.main(frame) local args = getArgs(frame, { trim = true, removeBlanks = false }) return p._main(args) end function p._main(args) local bold = _ne(args.bold) or _ne(args.boldlink) or _ne(args.boldname) local italic = _ne(args.italic) or _ne(args.italics) local dontBrace = _ne(args.brace) or _ne(args.braceinside) local code = _ne(args.code) or _ne(args.tt) local show_result = _ne(args._show_result) local expand = _ne(args._expand) -- Build the link part local titlePart = linkTitle(args) if bold then titlePart = "'''" .. titlePart .. "'''" end if _ne(args.nowrapname) then titlePart = '<span class="nowrap">' .. titlePart .. '</span>' end -- Build the arguments local textPart = "" local textPartBuffer = "&#124;" local codeArguments = {} local codeArgumentsString = "" local i = 2 local j = 1 while args[i] do local val = args[i] if val ~= "" then if _ne(args.nowiki) then -- Unstrip nowiki tags first because calling nw on something that already contains nowiki tags will -- mangle the nowiki strip marker and result in literal UNIQ...QINU showing up val = nw(mw.text.unstripNoWiki(val)) end local k, v = string.match(val, "(.*)=(.*)") if not k then codeArguments[j] = val j = j + 1 else codeArguments[k] = v end codeArgumentsString = codeArgumentsString .. textPartBuffer .. val if italic then val = '<span style="font-style:italic;">' .. val .. '</span>' end textPart = textPart .. textPartBuffer .. val end i = i + 1 end -- final wrap local ret = titlePart .. textPart if not dontBrace then ret = nw('{{') .. ret .. nw('}}') end if _ne(args.a) then ret = nw('*') .. '&nbsp;' .. ret end if _ne(args.kbd) then ret = '<kbd>' .. ret .. '</kbd>' end if code then ret = '<code>' .. ret .. '</code>' elseif _ne(args.plaincode) then ret = '<code style="border:none;background:transparent;">' .. ret .. '</code>' end if _ne(args.nowrap) then ret = '<span class="nowrap">' .. ret .. '</span>' end --[[ Wrap as html?? local span = mw.html.create('span') span:wikitext(ret) --]] if _ne(args.debug) then ret = ret .. '\n<pre>' .. mw.text.encode(mw.dumpObject(args)) .. '</pre>' end if show_result then local result = mw.getCurrentFrame():expandTemplate{title = addTemplate(args[1]), args = codeArguments} ret = ret .. " → " .. result end if expand then local query = mw.text.encode('{{' .. addTemplate(args[1]) .. string.gsub(codeArgumentsString, textPartBuffer, "|") .. '}}') local url = mw.uri.fullUrl('special:ExpandTemplates', 'wpInput=' .. query) mw.log() ret = ret .. " [" .. tostring(url) .. "]" end return ret end return p c7307fa3959d308a2dd7fd2f5009c1ce6db3d122 Module:Template link general/doc 828 72 137 2024-02-10T01:09:32Z Aniceto 2 Created page with "{{Documentation}} {{Wikipedia template}} Implements {{Tl|Template link general}} and other templates in its family" wikitext text/x-wiki {{Documentation}} {{Wikipedia template}} Implements {{Tl|Template link general}} and other templates in its family 3d33857697946f3daa8224976687a7bd50e9635f Module:Hatnote list 828 73 138 2024-02-10T01:10:53Z Aniceto 2 Created page with "-------------------------------------------------------------------------------- -- Module:Hatnote list -- -- -- -- This module produces and formats lists for use in hatnotes. In particular, -- -- it implements the for-see list, i.e. lists of "For X, see Y" statements, -- -- as used in {{about}}, {{redirect}}, and their variants. Also introd..." Scribunto text/plain -------------------------------------------------------------------------------- -- Module:Hatnote list -- -- -- -- This module produces and formats lists for use in hatnotes. In particular, -- -- it implements the for-see list, i.e. lists of "For X, see Y" statements, -- -- as used in {{about}}, {{redirect}}, and their variants. Also introduced -- -- are andList & orList helpers for formatting lists with those conjunctions. -- -------------------------------------------------------------------------------- local mArguments --initialize lazily local mFormatLink = require('Module:Format link') local mHatnote = require('Module:Hatnote') local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local p = {} -------------------------------------------------------------------------------- -- List stringification helper functions -- -- These functions are used for stringifying lists, usually page lists inside -- the "Y" portion of "For X, see Y" for-see items. -------------------------------------------------------------------------------- --default options table used across the list stringification functions local stringifyListDefaultOptions = { conjunction = "and", separator = ",", altSeparator = ";", space = " ", formatted = false } --Searches display text only local function searchDisp(haystack, needle) return string.find( string.sub(haystack, (string.find(haystack, '|') or 0) + 1), needle ) end -- Stringifies a list generically; probably shouldn't be used directly local function stringifyList(list, options) -- Type-checks, defaults, and a shortcut checkType("stringifyList", 1, list, "table") if #list == 0 then return nil end checkType("stringifyList", 2, options, "table", true) options = options or {} for k, v in pairs(stringifyListDefaultOptions) do if options[k] == nil then options[k] = v end end local s = options.space -- Format the list if requested if options.formatted then list = mFormatLink.formatPages( {categorizeMissing = mHatnote.missingTargetCat}, list ) end -- Set the separator; if any item contains it, use the alternate separator local separator = options.separator for k, v in pairs(list) do if searchDisp(v, separator) then separator = options.altSeparator break end end -- Set the conjunction, apply Oxford comma, and force a comma if #1 has "§" local conjunction = s .. options.conjunction .. s if #list == 2 and searchDisp(list[1], "§") or #list > 2 then conjunction = separator .. conjunction end -- Return the formatted string return mw.text.listToText(list, separator .. s, conjunction) end --DRY function function p.conjList (conj, list, fmt) return stringifyList(list, {conjunction = conj, formatted = fmt}) end -- Stringifies lists with "and" or "or" function p.andList (...) return p.conjList("and", ...) end function p.orList (...) return p.conjList("or", ...) end -------------------------------------------------------------------------------- -- For see -- -- Makes a "For X, see [[Y]]." list from raw parameters. Intended for the -- {{about}} and {{redirect}} templates and their variants. -------------------------------------------------------------------------------- --default options table used across the forSee family of functions local forSeeDefaultOptions = { andKeyword = 'and', title = mw.title.getCurrentTitle().text, otherText = 'other uses', forSeeForm = 'For %s, see %s.', } --Collapses duplicate punctuation local function punctuationCollapse (text) local replacements = { ["%.%.$"] = ".", ["%?%.$"] = "?", ["%!%.$"] = "!", ["%.%]%]%.$"] = ".]]", ["%?%]%]%.$"] = "?]]", ["%!%]%]%.$"] = "!]]" } for k, v in pairs(replacements) do text = string.gsub(text, k, v) end return text end -- Structures arguments into a table for stringification, & options function p.forSeeArgsToTable (args, from, options) -- Type-checks and defaults checkType("forSeeArgsToTable", 1, args, 'table') checkType("forSeeArgsToTable", 2, from, 'number', true) from = from or 1 checkType("forSeeArgsToTable", 3, options, 'table', true) options = options or {} for k, v in pairs(forSeeDefaultOptions) do if options[k] == nil then options[k] = v end end -- maxArg's gotten manually because getArgs() and table.maxn aren't friends local maxArg = 0 for k, v in pairs(args) do if type(k) == 'number' and k > maxArg then maxArg = k end end -- Structure the data out from the parameter list: -- * forTable is the wrapper table, with forRow rows -- * Rows are tables of a "use" string & a "pages" table of pagename strings -- * Blanks are left empty for defaulting elsewhere, but can terminate list local forTable = {} local i = from local terminated = false -- If there is extra text, and no arguments are given, give nil value -- to not produce default of "For other uses, see foo (disambiguation)" if options.extratext and i > maxArg then return nil end -- Loop to generate rows repeat -- New empty row local forRow = {} -- On blank use, assume list's ended & break at end of this loop forRow.use = args[i] if not args[i] then terminated = true end -- New empty list of pages forRow.pages = {} -- Insert first pages item if present table.insert(forRow.pages, args[i + 1]) -- If the param after next is "and", do inner loop to collect params -- until the "and"'s stop. Blanks are ignored: "1|and||and|3" → {1, 3} while args[i + 2] == options.andKeyword do if args[i + 3] then table.insert(forRow.pages, args[i + 3]) end -- Increment to next "and" i = i + 2 end -- Increment to next use i = i + 2 -- Append the row table.insert(forTable, forRow) until terminated or i > maxArg return forTable end -- Stringifies a table as formatted by forSeeArgsToTable function p.forSeeTableToString (forSeeTable, options) -- Type-checks and defaults checkType("forSeeTableToString", 1, forSeeTable, "table", true) checkType("forSeeTableToString", 2, options, "table", true) options = options or {} for k, v in pairs(forSeeDefaultOptions) do if options[k] == nil then options[k] = v end end -- Stringify each for-see item into a list local strList = {} if forSeeTable then for k, v in pairs(forSeeTable) do local useStr = v.use or options.otherText local pagesStr = p.andList(v.pages, true) or mFormatLink._formatLink{ categorizeMissing = mHatnote.missingTargetCat, link = mHatnote.disambiguate(options.title) } local forSeeStr = string.format(options.forSeeForm, useStr, pagesStr) forSeeStr = punctuationCollapse(forSeeStr) table.insert(strList, forSeeStr) end end if options.extratext then table.insert(strList, punctuationCollapse(options.extratext..'.')) end -- Return the concatenated list return table.concat(strList, ' ') end -- Produces a "For X, see [[Y]]" string from arguments. Expects index gaps -- but not blank/whitespace values. Ignores named args and args < "from". function p._forSee (args, from, options) local forSeeTable = p.forSeeArgsToTable(args, from, options) return p.forSeeTableToString(forSeeTable, options) end -- As _forSee, but uses the frame. function p.forSee (frame, from, options) mArguments = require('Module:Arguments') return p._forSee(mArguments.getArgs(frame), from, options) end return p d0828422b1aa0d0d0092d699d059c9e882260398 Module:Hatnote list/doc 828 74 139 2024-02-10T01:11:25Z Aniceto 2 Created page with "{{Documentation}} {{Wikipedia template}} '''Module:Hatnote list''' produces and formats lists for use in hatnotes. In particular, it implements the for-see list, i.e. lists of "For X, see Y" statements, as used in {{t|about}}, {{t|redirect}}, and their variants. Also introduced are andList & orList helpers for formatting lists with those conjunctions." wikitext text/x-wiki {{Documentation}} {{Wikipedia template}} '''Module:Hatnote list''' produces and formats lists for use in hatnotes. In particular, it implements the for-see list, i.e. lists of "For X, see Y" statements, as used in {{t|about}}, {{t|redirect}}, and their variants. Also introduced are andList & orList helpers for formatting lists with those conjunctions. 2d32995da50176839ef11e92f9df1eef426ce55a Module:Format link 828 75 140 2024-02-10T01:13:42Z Aniceto 2 Created page with "-- Imported from: https://en.wikipedia.org/wiki/Module:Format_link -------------------------------------------------------------------------------- -- Format link -- -- Makes a wikilink from the given link and display values. Links are escaped -- with colons if necessary, and links to sections are detected and displayed -- with " § " as a separator rather than the standard MediaWiki "#". Used in -- the {{format link}} template. -----------------------------------------..." Scribunto text/plain -- Imported from: https://en.wikipedia.org/wiki/Module:Format_link -------------------------------------------------------------------------------- -- Format link -- -- Makes a wikilink from the given link and display values. Links are escaped -- with colons if necessary, and links to sections are detected and displayed -- with " § " as a separator rather than the standard MediaWiki "#". Used in -- the {{format link}} template. -------------------------------------------------------------------------------- local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local checkTypeForNamedArg = libraryUtil.checkTypeForNamedArg local mArguments -- lazily initialise [[Module:Arguments]] local mError -- lazily initialise [[Module:Error]] local yesno -- lazily initialise [[Module:Yesno]] local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getArgs(frame) -- Fetches the arguments from the parent frame. Whitespace is trimmed and -- blanks are removed. mArguments = require('Module:Arguments') return mArguments.getArgs(frame, {parentOnly = true}) end local function removeInitialColon(s) -- Removes the initial colon from a string, if present. return s:match('^:?(.*)') end local function maybeItalicize(s, shouldItalicize) -- Italicize s if s is a string and the shouldItalicize parameter is true. if s and shouldItalicize then return '<i>' .. s .. '</i>' else return s end end local function parseLink(link) -- Parse a link and return a table with the link's components. -- These components are: -- - link: the link, stripped of any initial colon (always present) -- - page: the page name (always present) -- - section: the page name (may be nil) -- - display: the display text, if manually entered after a pipe (may be nil) link = removeInitialColon(link) -- Find whether a faux display value has been added with the {{!}} magic -- word. local prePipe, display = link:match('^(.-)|(.*)$') link = prePipe or link -- Find the page, if it exists. -- For links like [[#Bar]], the page will be nil. local preHash, postHash = link:match('^(.-)#(.*)$') local page if not preHash then -- We have a link like [[Foo]]. page = link elseif preHash ~= '' then -- We have a link like [[Foo#Bar]]. page = preHash end -- Find the section, if it exists. local section if postHash and postHash ~= '' then section = postHash end return { link = link, page = page, section = section, display = display, } end local function formatDisplay(parsed, options) -- Formats a display string based on a parsed link table (matching the -- output of parseLink) and an options table (matching the input options for -- _formatLink). local page = maybeItalicize(parsed.page, options.italicizePage) local section = maybeItalicize(parsed.section, options.italicizeSection) if (not section) then return page elseif (not page) then return mw.ustring.format('§&nbsp;%s', section) else return mw.ustring.format('%s §&nbsp;%s', page, section) end end local function missingArgError(target) mError = require('Module:Error') return mError.error{message = 'Error: no link or target specified! ([[' .. target .. '#Errors|help]])' } end -------------------------------------------------------------------------------- -- Main functions -------------------------------------------------------------------------------- function p.formatLink(frame) -- The formatLink export function, for use in templates. yesno = require('Module:Yesno') local args = getArgs(frame) local link = args[1] or args.link local target = args[3] or args.target if not (link or target) then return missingArgError('Template:Format link') end return p._formatLink{ link = link, display = args[2] or args.display, target = target, italicizePage = yesno(args.italicizepage), italicizeSection = yesno(args.italicizesection), categorizeMissing = args.categorizemissing } end function p._formatLink(options) -- The formatLink export function, for use in modules. checkType('_formatLink', 1, options, 'table') local function check(key, expectedType) --for brevity checkTypeForNamedArg( '_formatLink', key, options[key], expectedType or 'string', true ) end check('link') check('display') check('target') check('italicizePage', 'boolean') check('italicizeSection', 'boolean') check('categorizeMissing') -- Normalize link and target and check that at least one is present if options.link == '' then options.link = nil end if options.target == '' then options.target = nil end if not (options.link or options.target) then return missingArgError('Module:Format link') end local parsed = parseLink(options.link) local display = options.display or parsed.display local catMissing = options.categorizeMissing local category = '' -- Find the display text if not display then display = formatDisplay(parsed, options) end -- Handle the target option if present if options.target then local parsedTarget = parseLink(options.target) parsed.link = parsedTarget.link parsed.page = parsedTarget.page end -- Test if page exists if a diagnostic category is specified if catMissing and (mw.ustring.len(catMissing) > 0) then local title = nil if parsed.page then title = mw.title.new(parsed.page) end if title and (not title.isExternal) then local success, exists = pcall(function() return title.exists end) if success and not exists then category = mw.ustring.format('[[Category:%s]]', catMissing) end end end -- Format the result as a link if parsed.link == display then return mw.ustring.format('[[:%s]]%s', parsed.link, category) else return mw.ustring.format('[[:%s|%s]]%s', parsed.link, display, category) end end -------------------------------------------------------------------------------- -- Derived convenience functions -------------------------------------------------------------------------------- function p.formatPages(options, pages) -- Formats an array of pages using formatLink and the given options table, -- and returns it as an array. Nil values are not allowed. local ret = {} for i, page in ipairs(pages) do ret[i] = p._formatLink{ link = page, categorizeMissing = options.categorizeMissing, italicizePage = options.italicizePage, italicizeSection = options.italicizeSection } end return ret end return p 410e1254e813fed6fe2f04598836316a197db2d1 Module:Format link/doc 828 76 141 2024-02-10T01:14:06Z Aniceto 2 Created page with "{{Documentation|fromWikipedia=true}} This module, migrated from origins in [[Module:Hatnote]], provides functionality for formatting links for display, including that powering the {{tl|format link}} template. It can pretty-format section links with the section symbol ("§") and appropriate whitespace, it automatically escapes category and file names with the [[Help:Colon trick|colon trick]], and includes functionality for italicizing the page or section name, and for d..." wikitext text/x-wiki {{Documentation|fromWikipedia=true}} This module, migrated from origins in [[Module:Hatnote]], provides functionality for formatting links for display, including that powering the {{tl|format link}} template. It can pretty-format section links with the section symbol ("§") and appropriate whitespace, it automatically escapes category and file names with the [[Help:Colon trick|colon trick]], and includes functionality for italicizing the page or section name, and for detecting and categorizing results that produce [[Wikipedia:Red link|red links]]. == Use from wikitext == The functions in this module cannot be used directly from #invoke, and must be used through templates instead. Please see [[Template:Format link]] for documentation on usage of that template. == Use from other Lua modules== To load this module from another Lua module, use the following code: <syntaxhighlight lang="lua"> local mFormatLink = require('Module:Format link') </syntaxhighlight> You can then use the functions as documented below. === _formatLink === <syntaxhighlight lang="lua"> mFormatLink._formatLink{ link = 'Link', display = 'Display', target = 'Target', italicizePage = true, italicizeSection = true, categorizeMissing = 'Pages using formatted red links' } </syntaxhighlight> Formats <var>link</var> as a wikilink. Categories and files are automatically escaped with the [[Help:Colon trick|colon trick]], and links to sections are automatically formatted as ''page § section'', rather than the MediaWiki default of ''page#section''. Several options modify the output: * If the <var>display</var> value is present, then it will be used as a display value. Any manual piping (using the <code><nowiki>{{!}}</nowiki></code> magic word or similar) present in <var>link</var> will be overridden by the <var>display</var> value if present. * If the <var>target</var> value is present, then it will override <var>link</var> as a target, but the result will still be ''displayed'' using either the value from <var>display</var>, or the result of formatting <var>link</var>. * If <var>italicizePage</var> is true, then the page portion of the link is italicized if present. * If <var>italicizeSection</var> is true, then the section portion of the link is italicized if present. * If <var>categorizeMissing</var> is a non-empty string, then that value is used as a category name, and that category will be applied if the resulting target of the link (no matter whether through <var>link</var> or through <var>target</var>) doesn't exist. ;Examples: : <syntaxhighlight lang="lua" inline>mFormatLink._formatLink{link = 'Foo#Bar'}</syntaxhighlight> &rarr; <nowiki>[[:Foo#Bar|Foo §&amp;nbsp;Bar]]</nowiki> &rarr; {{format link|Foo#Bar}} : <syntaxhighlight lang="lua" inline>mFormatLink._formatLink{link = 'Baz', display = 'Qux'}</syntaxhighlight> &rarr; <nowiki>[[:Baz|Qux]]</nowiki> &rarr; {{format link|Baz|Qux}} : <syntaxhighlight lang="lua" inline>mFormatLink._formatLink{link = 'Foo|Bar', display = 'Baz'}</syntaxhighlight> &rarr; <nowiki>[[:Foo|Baz]]</nowiki> &rarr; {{format link|Foo{{!}}Bar|Baz}} : <syntaxhighlight lang="lua" inline>mFormatLink._formatLink{link = '#Foo', target = 'Example#Foo'}</syntaxhighlight> &rarr; <nowiki>[[:Example#Foo|§&amp;nbsp;Foo]]</nowiki> &rarr; {{format link|#Foo||Example#Foo}} : <syntaxhighlight lang="lua" inline>mFormatLink._formatLink{link = 'The Lord of the Rings#Plot', italicizePage = true}</syntaxhighlight> &rarr; <nowiki>[[:The Lord of the Rings#Plot|''The Lord of the Rings'' §&amp;nbsp;Plot]]</nowiki> &rarr; {{format link|The Lord of the Rings#Plot|italicizepage=true}} : <syntaxhighlight lang="lua" inline>mFormatLink._formatLink{link = 'Cybercrime Prevention Act of 2012#Disini v. Secretary of Justice', italicizeSection = true}</syntaxhighlight> &rarr; <nowiki>[[:Cybercrime Prevention Act of 2012#Disini v. Secretary of Justice|Cybercrime Prevention Act of 2012 §&amp;nbsp;''Disini v. Secretary of Justice'']]</nowiki> &rarr; {{format link|Cybercrime Prevention Act of 2012#Disini v. Secretary of Justice|italicizesection=true}} : <syntaxhighlight lang="lua" inline>mFormatLink._formatLink{link = 'Nonexistent page', categorizeMissing = 'Example'}</syntaxhighlight> &rarr; <nowiki>[[:Nonexistent page]][[Category:Example]]</nowiki> &rarr; {{format link|Nonexistent page}} : <syntaxhighlight lang="lua" inline>mFormatLink._formatLink{link = 'Existing', categorizeMissing = 'Example'}</syntaxhighlight> &rarr; <nowiki>[[:Existing]]</nowiki> &rarr; {{format link|Existing}} === formatPages === <syntaxhighlight lang="lua"> mFormatLink.formatPages(options, pages) </syntaxhighlight> This derived function is useful for lists that format many links. It formats an array of pages using the [[#_formatLink|_formatLink]] function, and returns the result as an array. Options in the <var>options</var> table are applied, and use the same names as the options for <var>_formatLink</var>. ;Example :{{code|<nowiki>mFormatLink.formatPages({categorizeMissing = 'Example'}, {'Foo#Bar', 'Nonexistent page'})</nowiki>|lua}} &rarr; {{code|<nowiki>{'[[:Foo#Bar|Foo §&nbsp;Bar]]', '[[:Nonexistent page]][[Category:Example]]'}</nowiki>|lua}} == Errors == If <var>_formatLink</var> is used and neither a <var>link</var> nor a <var>target</var> argument is provided, then the module will produce an error message instead of its usual output, as it ''cannot'' then produce valid output. You can solve this error by providing appropriate parameters to <var>_formatLink</var>, or you may want to ensure that a more descriptive error is provided by a downstream template or module when it would otherwise call <var>_formatLink</var> with inadequate arguments. c3e1b2e33849e13947cfca6bf9d8f7946ac0bc24 Template:Format link 10 77 142 2024-02-10T01:17:01Z Aniceto 2 Created page with "<includeonly>{{{{{|safesubst:}}}#invoke:format link|formatLink}}</includeonly><noinclude> {{/doc}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude>" wikitext text/x-wiki <includeonly>{{{{{|safesubst:}}}#invoke:format link|formatLink}}</includeonly><noinclude> {{/doc}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 6cb2c0414625589fc6125beac624529903d938f4 Template:Format link/doc 10 78 143 2024-02-10T01:17:19Z Aniceto 2 Created page with "{{Documentation}} {{Wikipedia template}} This template formats a link for use in hatnote templates. It accepts up to three positional parameters, the link, an optional display value, and an optional target override (which if provided, makes the link parameter optional). These parameters may also be supplied by name, as <var>link</var>, <var>display</var>, and <var>target</var> respectively. Links to categories and files are automatically escaped with the [https://en.wik..." wikitext text/x-wiki {{Documentation}} {{Wikipedia template}} This template formats a link for use in hatnote templates. It accepts up to three positional parameters, the link, an optional display value, and an optional target override (which if provided, makes the link parameter optional). These parameters may also be supplied by name, as <var>link</var>, <var>display</var>, and <var>target</var> respectively. Links to categories and files are automatically escaped with the [https://en.wikipedia.org/wiki/Help:Colon_trick colon trick], and links to sections are automatically formatted as ''page § section'', rather than the MediaWiki default of ''page#section''. This template doesn't work with [https://en.wikipedia.org/wiki/Wikipedia:Substitution subst]. == Usage == '''Link only:''' {{tlc|format link|''link''}} '''Link plus display:''' {{tlc|format link|''link''|''display''}} '''Link with an italicized page name:''' {{tlc|format link|''link''|3=italicizepage=yes}} '''Link with an italicized section name:''' {{tlc|format link|''link''|3=italicizesection=yes}} If the link or display values contain an equals sign, you will need to specify the parameter names like this: {{tlc|format link|2=1=''link''|3=2=''display''}} '''Link with a target override:''' {{tlc|format link|''link''|''display''|''target''}} '''Link with parameters supplied by name:''' {{tlc|format link|2=link=''link''|3=display=''display''|4=target=''target''}} == Examples == * {{tlc|format link|Lion}} → <nowiki>[[Lion]]</nowiki> → {{format link|Lion}} * {{tlc|format link|Lion#Etymology}} → <nowiki>[[Lion#Etymology|Lion §&amp;nbsp;Etymology]]</nowiki> → {{format link|Lion#Etymology}} * {{tlc|format link|Category:Lions}} → <nowiki>[[:Category:Lions]]</nowiki> → {{format link|Category:Lions}} * {{tlc|format link|Lion#Etymology|Etymology of lion}} → <nowiki>[[Lion#Etymology|Etymology of lion]]</nowiki> → {{format link|Lion#Etymology|Etymology of lion}} * {{tlc|format link|#Bar||Foo#Bar}} → <nowiki>[[:Foo#Bar|§&amp;nbsp;Bar]]</nowiki> → {{format link|#Bar||Foo#Bar}} * {{tlc|format link|Quo warranto#Philippines|3=italicizepage=true}} → <nowiki>[[Quo warranto#Philippines|<i>Quo warranto</i> §&amp;nbsp;Philippines]]</nowiki> → {{format link|Quo warranto#Philippines|italicizepage=true}} * {{tlc|format link|Cybercrime Prevention Act of 2012#Disini v. Secretary of Justice|3=italicizesection=true}} &rarr; <nowiki>[[Cybercrime Prevention Act of 2012#Disini v. Secretary of Justice|Cybercrime Prevention Act of 2012 §&amp;nbsp;<i>Disini v. Secretary of Justice</i>]]</nowiki> &rarr; {{format link|Cybercrime Prevention Act of 2012#Disini v. Secretary of Justice|italicizesection=true}} * {{tlc|format link}} → {{format link|category=no}} == Errors == If this template is used and neither the <var>link</var> parameter (or positional parameter 1) nor the <var>target</var> parameter (or positional parameter 3) is supplied, then the template will return an error message. At least one of those must be supplied. <includeonly> <!-- Categories --> [[Category:Internal link templates]] </includeonly> 182a3082d8201806a45045854a2580dadd8bd73e Template:Tlc 10 79 144 2024-02-10T01:17:46Z Aniceto 2 Created page with "<includeonly>{{#Invoke:Template link general|main|nolink=yes|code=yes|nowrap=yes}}</includeonly><noinclude> {{Template:Template link general/doc}} <!-- Add categories to the /doc subpage, not here! --> </noinclude>" wikitext text/x-wiki <includeonly>{{#Invoke:Template link general|main|nolink=yes|code=yes|nowrap=yes}}</includeonly><noinclude> {{Template:Template link general/doc}} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 8d210e53c18acd93bbf28b60ae29ef99345fea5d Template:Template link general/doc 10 80 145 2024-02-10T01:18:07Z Aniceto 2 Created page with "{{Documentation}} {{Wikipedia template}} {{tsh|{{{1|tlg}}}|{{{2|}}}}} This template, often abbreviated as {{tlf|{{#switch:{{lc:{{ROOTPAGENAME}}}} | tlg | template link general = tlg | tlb | template link with bold = tlb | tlc | template link code = tlc | tlw ||template link with linked braces = tlw | tlf | template link with link off = tlf | tltss | template link with title span, subst = tltss | tlx | template link expanded = tlx | tlxb | template link expanded with bo..." wikitext text/x-wiki {{Documentation}} {{Wikipedia template}} {{tsh|{{{1|tlg}}}|{{{2|}}}}} This template, often abbreviated as {{tlf|{{#switch:{{lc:{{ROOTPAGENAME}}}} | tlg | template link general = tlg | tlb | template link with bold = tlb | tlc | template link code = tlc | tlw ||template link with linked braces = tlw | tlf | template link with link off = tlf | tltss | template link with title span, subst = tltss | tlx | template link expanded = tlx | tlxb | template link expanded with bold = tlxb | tlxi | template link expanded with italic = tlxi | tlxs | template link expanded with subst = tlxs | tls | template link with subst = tls | tnull | template link null = tnull | tlp | template link with parameters = tlp}} }}, is used to provide stylized formatting to template displays without actually using the template itself. ===Parameters=== With the exception of {{mono|alttext}}, the named parameters are toggles that are either omitted (default in most cases) or activated (by being assigned a value such as "on", "yes", "true", "include", etc.). They may be included in any order ([[#Examples|see Examples below]]). Certain templates have the parameter "on" by default; see [[#General-purpose formatting|the main table]] for all alternate options. {| class="wikitable" ! Parameter || Action || Use with<br>{{t|example}} || Default active |- | || Default (without accessory parameters) || {{tlg|example}} || |- | brace || Include braces as part of the template link || {{tlg|brace=yes|example}} || {{tl|tlw}}/{{tl|tn}} |- | braceinside || Include innermost braces as part of the template link || {{tlg|example|braceinside=yes}} || |- | bold || Renders the template link/name in '''bold''' || {{tlg|bold=yes|example}} || {{tl|tlb}}, {{tl|tlxb}} |- | code || Display output using HTML [[HTML element#code|{{tag|code}}]] tags ([[monospaced font]]) || {{tlg|code=yes|example}} || {{tl|tlc}}, {{tl|Template link expanded}}, etc. |- | italic || Display any parameters accompanying the template link/name in ''italics'' ||| {{tlg|italic=yes|example|param}} || {{tl|tlxi}} |- | kbd || Display output using HTML [[HTML element#kbd|{{tag|kbd}}]] tags (monospaced font) || {{tlg|kbd=yes|example}} || |- | nolink || Don't render the template name as a link || {{tlg|nolink=yes|example}} || {{tl|tlf}}, {{t|tnull}} |- | nowrap || Prevent the insertion of line breaks ([[word wrap]]) in the output || {{tlg|nowrap=yes|example}} || |- | nowrapname || Prevent word wrapping in the output of template name/link (parameters will wrap if needed) || {{tlg|nowrapname=yes|example}} || |- | plaincode || Uses {{tag|code|params=style="border:none; background:transparent;"}} || {{tlg|plaincode=yes|example}} || {{tl|tltss}} |- | subst || Include a [[Help:Substitution|subst:]] prefix before the template link/name || {{tlg|subst=yes|example}} || {{tl|tls}}, {{tl|tlxs}}, etc |- | {{para|alttext|[text]}} || Use [text] as the label for the template link || {{tlg|alttext=Other|example}} || {{tl|tla}} |- | _show_result || Will also display the result of the template. || {{tlx|Min|7|-5|_show_result=y}} || |- | _expand || Will add a link to the expanded template page. || {{tlx|Min|7|-5|_expand=y}} || |} <includeonly> <!-- Category --> [[Category:Internal link templates]] [[Category:Typing-aid templates]] </includeonly> bcc8a8da870e76ae70ee2fba3a921a6b991dff36 Template:Tlg 10 81 146 2024-02-10T01:18:54Z Aniceto 2 Created page with "{{{{{|safesubst:}}}#Invoke:Template link general|main}}<noinclude> {{/doc}} </noinclude>" wikitext text/x-wiki {{{{{|safesubst:}}}#Invoke:Template link general|main}}<noinclude> {{/doc}} </noinclude> 66bd000b27dc95df42568346c185334f805221b0 Template:Tlg/doc 10 82 147 2024-02-10T01:19:13Z Aniceto 2 Created page with "{{Documentation}} {{Wikipedia template}} {{tsh|{{{1|tlg}}}|{{{2|}}}}} This template, often abbreviated as {{tlf|{{#switch:{{lc:{{ROOTPAGENAME}}}} | tlg | template link general = tlg | tlb | template link with bold = tlb | tlc | template link code = tlc | tlw ||template link with linked braces = tlw | tlf | template link with link off = tlf | tltss | template link with title span, subst = tltss | tlx | template link expanded = tlx | tlxb | template link expanded with bo..." wikitext text/x-wiki {{Documentation}} {{Wikipedia template}} {{tsh|{{{1|tlg}}}|{{{2|}}}}} This template, often abbreviated as {{tlf|{{#switch:{{lc:{{ROOTPAGENAME}}}} | tlg | template link general = tlg | tlb | template link with bold = tlb | tlc | template link code = tlc | tlw ||template link with linked braces = tlw | tlf | template link with link off = tlf | tltss | template link with title span, subst = tltss | tlx | template link expanded = tlx | tlxb | template link expanded with bold = tlxb | tlxi | template link expanded with italic = tlxi | tlxs | template link expanded with subst = tlxs | tls | template link with subst = tls | tnull | template link null = tnull | tlp | template link with parameters = tlp}} }}, is used to provide stylized formatting to template displays without actually using the template itself. ===Parameters=== With the exception of {{mono|alttext}}, the named parameters are toggles that are either omitted (default in most cases) or activated (by being assigned a value such as "on", "yes", "true", "include", etc.). They may be included in any order ([[#Examples|see Examples below]]). Certain templates have the parameter "on" by default; see [[#General-purpose formatting|the main table]] for all alternate options. {| class="wikitable" ! Parameter || Action || Use with<br>{{t|example}} || Default active |- | || Default (without accessory parameters) || {{tlg|example}} || |- | brace || Include braces as part of the template link || {{tlg|brace=yes|example}} || {{tl|tlw}}/{{tl|tn}} |- | braceinside || Include innermost braces as part of the template link || {{tlg|example|braceinside=yes}} || |- | bold || Renders the template link/name in '''bold''' || {{tlg|bold=yes|example}} || {{tl|tlb}}, {{tl|tlxb}} |- | code || Display output using HTML [[HTML element#code|{{tag|code}}]] tags ([[monospaced font]]) || {{tlg|code=yes|example}} || {{tl|tlc}}, {{tl|Template link expanded}}, etc. |- | italic || Display any parameters accompanying the template link/name in ''italics'' ||| {{tlg|italic=yes|example|param}} || {{tl|tlxi}} |- | kbd || Display output using HTML [[HTML element#kbd|{{tag|kbd}}]] tags (monospaced font) || {{tlg|kbd=yes|example}} || |- | nolink || Don't render the template name as a link || {{tlg|nolink=yes|example}} || {{tl|tlf}}, {{t|tnull}} |- | nowrap || Prevent the insertion of line breaks ([[word wrap]]) in the output || {{tlg|nowrap=yes|example}} || |- | nowrapname || Prevent word wrapping in the output of template name/link (parameters will wrap if needed) || {{tlg|nowrapname=yes|example}} || |- | plaincode || Uses {{tag|code|params=style="border:none; background:transparent;"}} || {{tlg|plaincode=yes|example}} || {{tl|tltss}} |- | subst || Include a [[Help:Substitution|subst:]] prefix before the template link/name || {{tlg|subst=yes|example}} || {{tl|tls}}, {{tl|tlxs}}, etc |- | {{para|alttext|[text]}} || Use [text] as the label for the template link || {{tlg|alttext=Other|example}} || {{tl|tla}} |- | _show_result || Will also display the result of the template. || {{tlx|Min|7|-5|_show_result=y}} || |- | _expand || Will add a link to the expanded template page. || {{tlx|Min|7|-5|_expand=y}} || |} <includeonly> <!-- Category --> [[Category:Internal link templates]] [[Category:Typing-aid templates]] </includeonly> bcc8a8da870e76ae70ee2fba3a921a6b991dff36 Template:Tlf 10 83 148 2024-02-10T01:19:44Z Aniceto 2 Created page with "<includeonly>{{#Invoke:Template link general|main|nowrap=yes|nolink=yes}}</includeonly><noinclude> {{/doc}} <!-- Add categories to the /doc subpage, not here! --> </noinclude>" wikitext text/x-wiki <includeonly>{{#Invoke:Template link general|main|nowrap=yes|nolink=yes}}</includeonly><noinclude> {{/doc}} <!-- Add categories to the /doc subpage, not here! --> </noinclude> 1616655857f270ddf2995fca08b2605775a1240e Template:Tlf/doc 10 84 149 2024-02-10T01:20:01Z Aniceto 2 Created page with "{{Documentation}} {{Wikipedia template}} {{tsh|{{{1|tlg}}}|{{{2|}}}}} This template, often abbreviated as {{tlf|{{#switch:{{lc:{{ROOTPAGENAME}}}} | tlg | template link general = tlg | tlb | template link with bold = tlb | tlc | template link code = tlc | tlw ||template link with linked braces = tlw | tlf | template link with link off = tlf | tltss | template link with title span, subst = tltss | tlx | template link expanded = tlx | tlxb | template link expanded with bo..." wikitext text/x-wiki {{Documentation}} {{Wikipedia template}} {{tsh|{{{1|tlg}}}|{{{2|}}}}} This template, often abbreviated as {{tlf|{{#switch:{{lc:{{ROOTPAGENAME}}}} | tlg | template link general = tlg | tlb | template link with bold = tlb | tlc | template link code = tlc | tlw ||template link with linked braces = tlw | tlf | template link with link off = tlf | tltss | template link with title span, subst = tltss | tlx | template link expanded = tlx | tlxb | template link expanded with bold = tlxb | tlxi | template link expanded with italic = tlxi | tlxs | template link expanded with subst = tlxs | tls | template link with subst = tls | tnull | template link null = tnull | tlp | template link with parameters = tlp}} }}, is used to provide stylized formatting to template displays without actually using the template itself. ===Parameters=== With the exception of {{mono|alttext}}, the named parameters are toggles that are either omitted (default in most cases) or activated (by being assigned a value such as "on", "yes", "true", "include", etc.). They may be included in any order ([[#Examples|see Examples below]]). Certain templates have the parameter "on" by default; see [[#General-purpose formatting|the main table]] for all alternate options. {| class="wikitable" ! Parameter || Action || Use with<br>{{t|example}} || Default active |- | || Default (without accessory parameters) || {{tlg|example}} || |- | brace || Include braces as part of the template link || {{tlg|brace=yes|example}} || {{tl|tlw}}/{{tl|tn}} |- | braceinside || Include innermost braces as part of the template link || {{tlg|example|braceinside=yes}} || |- | bold || Renders the template link/name in '''bold''' || {{tlg|bold=yes|example}} || {{tl|tlb}}, {{tl|tlxb}} |- | code || Display output using HTML [[HTML element#code|{{tag|code}}]] tags ([[monospaced font]]) || {{tlg|code=yes|example}} || {{tl|tlc}}, {{tl|Template link expanded}}, etc. |- | italic || Display any parameters accompanying the template link/name in ''italics'' ||| {{tlg|italic=yes|example|param}} || {{tl|tlxi}} |- | kbd || Display output using HTML [[HTML element#kbd|{{tag|kbd}}]] tags (monospaced font) || {{tlg|kbd=yes|example}} || |- | nolink || Don't render the template name as a link || {{tlg|nolink=yes|example}} || {{tl|tlf}}, {{t|tnull}} |- | nowrap || Prevent the insertion of line breaks ([[word wrap]]) in the output || {{tlg|nowrap=yes|example}} || |- | nowrapname || Prevent word wrapping in the output of template name/link (parameters will wrap if needed) || {{tlg|nowrapname=yes|example}} || |- | plaincode || Uses {{tag|code|params=style="border:none; background:transparent;"}} || {{tlg|plaincode=yes|example}} || {{tl|tltss}} |- | subst || Include a [[Help:Substitution|subst:]] prefix before the template link/name || {{tlg|subst=yes|example}} || {{tl|tls}}, {{tl|tlxs}}, etc |- | {{para|alttext|[text]}} || Use [text] as the label for the template link || {{tlg|alttext=Other|example}} || {{tl|tla}} |- | _show_result || Will also display the result of the template. || {{tlx|Min|7|-5|_show_result=y}} || |- | _expand || Will add a link to the expanded template page. || {{tlx|Min|7|-5|_expand=y}} || |} <includeonly> <!-- Category --> [[Category:Internal link templates]] [[Category:Typing-aid templates]] </includeonly> bcc8a8da870e76ae70ee2fba3a921a6b991dff36 Template:Mono 10 85 150 2024-02-10T01:22:18Z Aniceto 2 Created page with "<span style="font-family: monospace, monospace;">{{{2|{{{1}}}}}}</span><noinclude> {{/doc}}</noinclude>" wikitext text/x-wiki <span style="font-family: monospace, monospace;">{{{2|{{{1}}}}}}</span><noinclude> {{/doc}}</noinclude> cc63ba82b36133e3d6b10a31c35d17158b223395 Template:Mono/doc 10 86 151 2024-02-10T01:22:30Z Aniceto 2 Created page with "{{Documentation}} == Usage == {{tlx|Mono|<var>text to format here</var>}} renders as: {{Mono|text to format here}} This template is for formatting short bits of content (the only parameter) as monospaced (nonproportional) text. It is simply a quick shorthand for the necessary {{WP|ref=no|Cascading Style Sheets|text=CSS}} code. It is a replacement for {{tag|tt}} which is an obsolete element under HTML5. ([http://www.w3.org/TR/html5/obsolete.html#non-conforming-featu..." wikitext text/x-wiki {{Documentation}} == Usage == {{tlx|Mono|<var>text to format here</var>}} renders as: {{Mono|text to format here}} This template is for formatting short bits of content (the only parameter) as monospaced (nonproportional) text. It is simply a quick shorthand for the necessary {{WP|ref=no|Cascading Style Sheets|text=CSS}} code. It is a replacement for {{tag|tt}} which is an obsolete element under HTML5. ([http://www.w3.org/TR/html5/obsolete.html#non-conforming-features Non-conforming features]) This template ''should'' be used where the content is being rendered in monospaced text for purely stylistic/display reasons, where this display has no particular semantic significance. It ''should not'' be used to indicate source code, nor for variables or variable input (use {{tag|code}} or {{tag|source}} for code and {{tag|var}} for variables). For keyboard or samples, use {{tag|kbd}} or {{tag|samp}} respectively. It ''cannot'' be used to mark up multiple paragraphs, sections or other block elements, as it uses {{tag|span|o}}, which is an inline element. See {{tl|Monoblock}} for a <code>&lt;div&gt;</code>-based block version. Or, multiple instances of {{tl|Mono}} can be invoked. ===Parameters=== ;There are two parameters: :{{para|1}} or unnamed – the content to format as monospaced. If the content contains a <code>=</code> character, the parameter must be numbered or the template will break. For backward compatibility with an old, merged-in template, this parameter can also be called {{para|2}}. :{{para|needs_review|yes}} – used (e.g. by {{WP|ref=no|WP:Bot|text=bots}} or {{WP|ref=no|WP:AWB|text=AWB}} scripts) to indicate replacement of now-obsolete {{tag|tt}} markup with {{tlx|mono|...}} markup. This template displays nothing and presently does no categorization, though a cleanup category can be created if necessary. It indicates that the markup may need to be changed to something more semantically meaningful, such as {{tag|code}}, {{tag|samp}}, or {{tag|kbd}}. <includeonly> [[Category:Typing-aid templates]] </includeonly> <noinclude></noinclude> aa9a4e064c7482e14c5d24e69f4e0e12d99bd228 Module:Arguments 828 87 152 2024-02-10T01:23:07Z Aniceto 2 Created page with "-- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string'..." Scribunto text/plain -- This module provides easy processing of arguments passed to Scribunto from -- #invoke. It is intended for use by other Lua modules, and should not be -- called from #invoke directly. local libraryUtil = require('libraryUtil') local checkType = libraryUtil.checkType local arguments = {} -- Generate four different tidyVal functions, so that we don't have to check the -- options every time we call it. local function tidyValDefault(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil else return val end else return val end end local function tidyValTrimOnly(key, val) if type(val) == 'string' then return val:match('^%s*(.-)%s*$') else return val end end local function tidyValRemoveBlanksOnly(key, val) if type(val) == 'string' then if val:find('%S') then return val else return nil end else return val end end local function tidyValNoChange(key, val) return val end local function matchesTitle(given, title) local tp = type( given ) return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title end local translate_mt = { __index = function(t, k) return k end } function arguments.getArgs(frame, options) checkType('getArgs', 1, frame, 'table', true) checkType('getArgs', 2, options, 'table', true) frame = frame or {} options = options or {} --[[ -- Set up argument translation. --]] options.translate = options.translate or {} if getmetatable(options.translate) == nil then setmetatable(options.translate, translate_mt) end if options.backtranslate == nil then options.backtranslate = {} for k,v in pairs(options.translate) do options.backtranslate[v] = k end end if options.backtranslate and getmetatable(options.backtranslate) == nil then setmetatable(options.backtranslate, { __index = function(t, k) if options.translate[k] ~= k then return nil else return k end end }) end --[[ -- Get the argument tables. If we were passed a valid frame object, get the -- frame arguments (fargs) and the parent frame arguments (pargs), depending -- on the options set and on the parent frame's availability. If we weren't -- passed a valid frame object, we are being called from another Lua module -- or from the debug console, so assume that we were passed a table of args -- directly, and assign it to a new variable (luaArgs). --]] local fargs, pargs, luaArgs if type(frame.args) == 'table' and type(frame.getParent) == 'function' then if options.wrappers then --[[ -- The wrappers option makes Module:Arguments look up arguments in -- either the frame argument table or the parent argument table, but -- not both. This means that users can use either the #invoke syntax -- or a wrapper template without the loss of performance associated -- with looking arguments up in both the frame and the parent frame. -- Module:Arguments will look up arguments in the parent frame -- if it finds the parent frame's title in options.wrapper; -- otherwise it will look up arguments in the frame object passed -- to getArgs. --]] local parent = frame:getParent() if not parent then fargs = frame.args else local title = parent:getTitle():gsub('/sandbox$', '') local found = false if matchesTitle(options.wrappers, title) then found = true elseif type(options.wrappers) == 'table' then for _,v in pairs(options.wrappers) do if matchesTitle(v, title) then found = true break end end end -- We test for false specifically here so that nil (the default) acts like true. if found or options.frameOnly == false then pargs = parent.args end if not found or options.parentOnly == false then fargs = frame.args end end else -- options.wrapper isn't set, so check the other options. if not options.parentOnly then fargs = frame.args end if not options.frameOnly then local parent = frame:getParent() pargs = parent and parent.args or nil end end if options.parentFirst then fargs, pargs = pargs, fargs end else luaArgs = frame end -- Set the order of precedence of the argument tables. If the variables are -- nil, nothing will be added to the table, which is how we avoid clashes -- between the frame/parent args and the Lua args. local argTables = {fargs} argTables[#argTables + 1] = pargs argTables[#argTables + 1] = luaArgs --[[ -- Generate the tidyVal function. If it has been specified by the user, we -- use that; if not, we choose one of four functions depending on the -- options chosen. This is so that we don't have to call the options table -- every time the function is called. --]] local tidyVal = options.valueFunc if tidyVal then if type(tidyVal) ~= 'function' then error( "bad value assigned to option 'valueFunc'" .. '(function expected, got ' .. type(tidyVal) .. ')', 2 ) end elseif options.trim ~= false then if options.removeBlanks ~= false then tidyVal = tidyValDefault else tidyVal = tidyValTrimOnly end else if options.removeBlanks ~= false then tidyVal = tidyValRemoveBlanksOnly else tidyVal = tidyValNoChange end end --[[ -- Set up the args, metaArgs and nilArgs tables. args will be the one -- accessed from functions, and metaArgs will hold the actual arguments. Nil -- arguments are memoized in nilArgs, and the metatable connects all of them -- together. --]] local args, metaArgs, nilArgs, metatable = {}, {}, {}, {} setmetatable(args, metatable) local function mergeArgs(tables) --[[ -- Accepts multiple tables as input and merges their keys and values -- into one table. If a value is already present it is not overwritten; -- tables listed earlier have precedence. We are also memoizing nil -- values, which can be overwritten if they are 's' (soft). --]] for _, t in ipairs(tables) do for key, val in pairs(t) do if metaArgs[key] == nil and nilArgs[key] ~= 'h' then local tidiedVal = tidyVal(key, val) if tidiedVal == nil then nilArgs[key] = 's' else metaArgs[key] = tidiedVal end end end end end --[[ -- Define metatable behaviour. Arguments are memoized in the metaArgs table, -- and are only fetched from the argument tables once. Fetching arguments -- from the argument tables is the most resource-intensive step in this -- module, so we try and avoid it where possible. For this reason, nil -- arguments are also memoized, in the nilArgs table. Also, we keep a record -- in the metatable of when pairs and ipairs have been called, so we do not -- run pairs and ipairs on the argument tables more than once. We also do -- not run ipairs on fargs and pargs if pairs has already been run, as all -- the arguments will already have been copied over. --]] metatable.__index = function (t, key) --[[ -- Fetches an argument when the args table is indexed. First we check -- to see if the value is memoized, and if not we try and fetch it from -- the argument tables. When we check memoization, we need to check -- metaArgs before nilArgs, as both can be non-nil at the same time. -- If the argument is not present in metaArgs, we also check whether -- pairs has been run yet. If pairs has already been run, we return nil. -- This is because all the arguments will have already been copied into -- metaArgs by the mergeArgs function, meaning that any other arguments -- must be nil. --]] if type(key) == 'string' then key = options.translate[key] end local val = metaArgs[key] if val ~= nil then return val elseif metatable.donePairs or nilArgs[key] then return nil end for _, argTable in ipairs(argTables) do local argTableVal = tidyVal(key, argTable[key]) if argTableVal ~= nil then metaArgs[key] = argTableVal return argTableVal end end nilArgs[key] = 'h' return nil end metatable.__newindex = function (t, key, val) -- This function is called when a module tries to add a new value to the -- args table, or tries to change an existing value. if type(key) == 'string' then key = options.translate[key] end if options.readOnly then error( 'could not write to argument table key "' .. tostring(key) .. '"; the table is read-only', 2 ) elseif options.noOverwrite and args[key] ~= nil then error( 'could not write to argument table key "' .. tostring(key) .. '"; overwriting existing arguments is not permitted', 2 ) elseif val == nil then --[[ -- If the argument is to be overwritten with nil, we need to erase -- the value in metaArgs, so that __index, __pairs and __ipairs do -- not use a previous existing value, if present; and we also need -- to memoize the nil in nilArgs, so that the value isn't looked -- up in the argument tables if it is accessed again. --]] metaArgs[key] = nil nilArgs[key] = 'h' else metaArgs[key] = val end end local function translatenext(invariant) local k, v = next(invariant.t, invariant.k) invariant.k = k if k == nil then return nil elseif type(k) ~= 'string' or not options.backtranslate then return k, v else local backtranslate = options.backtranslate[k] if backtranslate == nil then -- Skip this one. This is a tail call, so this won't cause stack overflow return translatenext(invariant) else return backtranslate, v end end end metatable.__pairs = function () -- Called when pairs is run on the args table. if not metatable.donePairs then mergeArgs(argTables) metatable.donePairs = true end return translatenext, { t = metaArgs } end local function inext(t, i) -- This uses our __index metamethod local v = t[i + 1] if v ~= nil then return i + 1, v end end metatable.__ipairs = function (t) -- Called when ipairs is run on the args table. return inext, t, 0 end return args end return arguments 3134ecce8429b810d445e29eae115e2ae4c36c53 Module:Arguments/doc 828 88 153 2024-02-10T01:23:34Z Aniceto 2 Created page with "{{Documentation|scwShared=true|fromWikipedia=true}} '''Module:Arguments''' provides easy processing of arguments passed from #invoke. It is a meta-module, meant for use by other modules, and should not be called from #invoke directly. Its features include: * Easy trimming of arguments and removal of blank arguments. * Arguments can be passed by both the current frame and by the parent frame at the same time. (More details below.) * Arguments can be passed in directly fr..." wikitext text/x-wiki {{Documentation|scwShared=true|fromWikipedia=true}} '''Module:Arguments''' provides easy processing of arguments passed from #invoke. It is a meta-module, meant for use by other modules, and should not be called from #invoke directly. Its features include: * Easy trimming of arguments and removal of blank arguments. * Arguments can be passed by both the current frame and by the parent frame at the same time. (More details below.) * Arguments can be passed in directly from another Lua module or from the debug console. * Arguments are fetched as needed, which can help avoid (some) problems with {{tag|ref}} tags. * Most features can be customized. 9fe0e50a496035facb4020348ef1b54425343245 Module:Mbox 828 89 154 2024-02-10T01:24:15Z Aniceto 2 Created page with "local libraryUtil = require( 'libraryUtil' ) local checkType = libraryUtil.checkType local mArguments -- lazily initialise [[Module:Arguments]] local mError -- lazily initialise [[Module:Error]] local p = {} --- Helper function to throw error -- -- @param msg string - Error message -- -- @return string - Formatted error message in wikitext local function makeWikitextError( msg ) mError = require( 'Module:Error' ) return mError.error{ message = 'Error: ' .. msg .. '..." Scribunto text/plain local libraryUtil = require( 'libraryUtil' ) local checkType = libraryUtil.checkType local mArguments -- lazily initialise [[Module:Arguments]] local mError -- lazily initialise [[Module:Error]] local p = {} --- Helper function to throw error -- -- @param msg string - Error message -- -- @return string - Formatted error message in wikitext local function makeWikitextError( msg ) mError = require( 'Module:Error' ) return mError.error{ message = 'Error: ' .. msg .. '.' } end function p.mbox( frame ) local args = getArgs( frame ) local title = args[1] or args[ 'title' ] local text = args[2] or args[ 'text' ] if not s then return p.makeWikitextError( 'no text specified', 'Template:Mbox#Errors', args.category ) end return p._mbox( title, text, { extraclasses = args.extraclasses, icon = args.icon } ) end function p._mbox( title, text, options ) checkType( '_mbox', 1, title, 'string' ) checkType( '_mbox', 2, text, 'string' ) checkType( '_mbox', 3, options, 'table', true ) options = options or {} local mbox = mw.html.create( 'div' ) local extraclasses if type( options.extraclasses ) == 'string' then extraclasses = options.extraclasses end mbox :attr( 'role', 'presentation' ) :addClass( 'mbox' ) :addClass( extraclasses ) local mboxTitle = mbox:tag( 'div' ):addClass( 'mbox-title' ) if options.icon and type( options.icon ) == 'string' then mboxTitle:tag( 'div' ) :addClass( 'mbox-icon metadata' ) :wikitext( '[[File:' .. options.icon .. '|14px|link=]]' ) :done() :tag( 'div' ) :wikitext( title ) else mboxTitle:wikitext( title ) end mbox:tag( 'div' ) :addClass( 'mbox-text' ) :wikitext( text ) return mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Mbox/styles.css' } } .. tostring(mbox) end return p 3ac408bcf509952e70b97e64cb1062fe21f6c4bf Module:Mbox/doc 828 90 155 2024-02-10T01:26:20Z Aniceto 2 Created page with "{{Documentation}}" wikitext text/x-wiki {{Documentation}} 5f404a8e0c14aa9609b6f36429b9618bb87a37ea Module:Module toc 828 91 156 2024-02-10T01:27:23Z Aniceto 2 Created page with "-- Imported from: https://runescape.wiki/w/Module:Module%20toc -- <nowiki> local p = {} local function getNewlineLocations( content ) local locs = {} local pos = 0 repeat pos = string.find( content, '\n', pos + 1, true ) table.insert( locs, pos ) until not pos return locs end local function findLineNumber( pos, newLineLocs ) local max = #newLineLocs local min = 1 repeat local i = math.ceil( (max + min) / 2 )..." Scribunto text/plain -- Imported from: https://runescape.wiki/w/Module:Module%20toc -- <nowiki> local p = {} local function getNewlineLocations( content ) local locs = {} local pos = 0 repeat pos = string.find( content, '\n', pos + 1, true ) table.insert( locs, pos ) until not pos return locs end local function findLineNumber( pos, newLineLocs ) local max = #newLineLocs local min = 1 repeat local i = math.ceil( (max + min) / 2 ) if newLineLocs[i] < pos then min = i elseif newLineLocs[i] >= pos then max = i end until newLineLocs[i] > pos and (newLineLocs[i - 1] or 0) < pos return max end local function getFunctionLocations( content ) local locs = {} local newLineLocs = getNewlineLocations( content ) local start = 0 repeat local name name, start = string.match( content, '%sfunction%s+([^%s%(]+)%s*%(()', start + 1 ) if start then table.insert( locs, { name=name, line = findLineNumber( start, newLineLocs ) } ) end until not start start = 0 repeat local name name, start = string.match( content, '%s([^%s=])%s*=%s*function%s*%(()', start + 1 ) if start then table.insert( locs, { name=name, line = findLineNumber( start, newLineLocs ) } ) end until not start return locs end function p.main() local title = mw.title.getCurrentTitle() local moduleName = string.gsub( title.text, '/[Dd]oc$', '' ) if title.namespace ~= 828 then return '' end local fullModuleName = string.gsub( title.fullText, '/[Dd]oc$', '' ) local content = mw.title.new( fullModuleName ):getContent() if not content then return '' end local function substMutilineComment( match ) local lineCount = #getNewlineLocations( match ) return string.rep( '\n', lineCount ) or '' end content = content:gsub( '(%-%-%[(=-)%[.-%]%2%])', substMutilineComment ):gsub( '%-%-[^\n]*', '' ) -- Strip comments local functionLocs = getFunctionLocations( content ) table.sort( functionLocs, function(lhs, rhs) return lhs.line < rhs.line end ) if #functionLocs == 0 then return '' end local res = {} for _, func in ipairs( functionLocs ) do table.insert( res, string.format( 'L %d &mdash; [%s#L-%d %s]', func.line, title:fullUrl():gsub( '/[Dd]oc$', '' ), func.line, func.name ) ) end local tbl = mw.html.create( 'table' ):addClass( 'wikitable mw-collapsible mw-collapsed' ) tbl:tag( 'tr' ) :tag( 'th' ):wikitext( 'Function list' ):done() :tag( 'tr' ) :tag( 'td' ):wikitext( table.concat( res, '<br>' ) ) return tostring( tbl ) end return p -- </nowiki> f33265f570ddcc37a541fe88cbd1536f3e8f7d69 Module:Module toc/doc 828 92 157 2024-02-10T01:27:36Z Aniceto 2 Created page with "{{Documentation}} This module is used to generate a table of content consists of functions of a [[SC:Lua|Lua]] module. See [https://runescape.wiki/w/Module:Module_toc Module:Module toc] on RuneScape Wiki for more details." wikitext text/x-wiki {{Documentation}} This module is used to generate a table of content consists of functions of a [[SC:Lua|Lua]] module. See [https://runescape.wiki/w/Module:Module_toc Module:Module toc] on RuneScape Wiki for more details. 2fb029d346aa2f2e9fc3737c6bc80255068f8592 Module:String 828 93 158 2024-02-10T01:28:09Z Aniceto 2 Created page with "--[[ This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace. Global options ignore_errors: If set to 'true' or 1, any error c..." Scribunto text/plain --[[ This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace. Global options ignore_errors: If set to 'true' or 1, any error condition will result in an empty string being returned rather than an error message. error_category: If an error occurs, specifies the name of a category to include with the error message. The default category is [Category:Errors reported by Module String]. no_category: If set to 'true' or 1, no category will be added if an error is generated. Unit tests for this module are available at Module:String/tests. ]] local str = {} --[[ len This function returns the length of the target string. Usage: {{#invoke:String|len|target_string|}} OR {{#invoke:String|len|s=target_string}} Parameters s: The string whose length to report If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. ]] function str.len( frame ) local new_args = str._getParameters( frame.args, {'s'} ) local s = new_args['s'] or '' return mw.ustring.len( s ) end --[[ sub This function returns a substring of the target string at specified indices. Usage: {{#invoke:String|sub|target_string|start_index|end_index}} OR {{#invoke:String|sub|s=target_string|i=start_index|j=end_index}} Parameters s: The string to return a subset of i: The fist index of the substring to return, defaults to 1. j: The last index of the string to return, defaults to the last character. The first character of the string is assigned an index of 1. If either i or j is a negative value, it is interpreted the same as selecting a character by counting from the end of the string. Hence, a value of -1 is the same as selecting the last character of the string. If the requested indices are out of range for the given string, an error is reported. ]] function str.sub( frame ) local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } ) local s = new_args['s'] or '' local i = tonumber( new_args['i'] ) or 1 local j = tonumber( new_args['j'] ) or -1 local len = mw.ustring.len( s ) -- Convert negatives for range checking if i < 0 then i = len + i + 1 end if j < 0 then j = len + j + 1 end if i > len or j > len or i < 1 or j < 1 then return str._error( 'String subset index out of range' ) end if j < i then return str._error( 'String subset indices out of order' ) end return mw.ustring.sub( s, i, j ) end --[[ This function implements that features of {{str sub old}} and is kept in order to maintain these older templates. ]] function str.sublength( frame ) local i = tonumber( frame.args.i ) or 0 local len = tonumber( frame.args.len ) return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) ) end --[[ _match This function returns a substring from the source string that matches a specified pattern. It is exported for use in other modules Usage: strmatch = require("Module:String")._match sresult = strmatch( s, pattern, start, match, plain, nomatch ) Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This sub-routine is exported for use in other modules function str._match( s, pattern, start, match_index, plain_flag, nomatch ) if s == '' then return str._error( 'Target string is empty' ) end if pattern == '' then return str._error( 'Pattern string is empty' ) end start = tonumber(start) or 1 if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then return str._error( 'Requested start is out of range' ) end if match_index == 0 then return str._error( 'Match index is out of range' ) end if plain_flag then pattern = str._escapePattern( pattern ) end local result if match_index == 1 then -- Find first match is simple case result = mw.ustring.match( s, pattern, start ) else if start > 1 then s = mw.ustring.sub( s, start ) end local iterator = mw.ustring.gmatch(s, pattern) if match_index > 0 then -- Forward search for w in iterator do match_index = match_index - 1 if match_index == 0 then result = w break end end else -- Reverse search local result_table = {} local count = 1 for w in iterator do result_table[count] = w count = count + 1 end result = result_table[ count + match_index ] end end if result == nil then if nomatch == nil then return str._error( 'Match not found' ) else return nomatch end else return result end end --[[ match This function returns a substring from the source string that matches a specified pattern. Usage: {{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}} OR {{#invoke:String|match|s=source_string|pattern=pattern_string|start=start_index |match=match_number|plain=plain_flag|nomatch=nomatch_output}} Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from each string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. If the match_number or start_index are out of range for the string being queried, then this function generates an error. An error is also generated if no match is found. If one adds the parameter ignore_errors=true, then the error will be suppressed and an empty string will be returned on any failure. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This is the entry point for #invoke:String|match function str.match( frame ) local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} ) local s = new_args['s'] or '' local start = tonumber( new_args['start'] ) or 1 local plain_flag = str._getBoolean( new_args['plain'] or false ) local pattern = new_args['pattern'] or '' local match_index = math.floor( tonumber(new_args['match']) or 1 ) local nomatch = new_args['nomatch'] return str._match( s, pattern, start, match_index, plain_flag, nomatch ) end --[[ pos This function returns a single character from the target string at position pos. Usage: {{#invoke:String|pos|target_string|index_value}} OR {{#invoke:String|pos|target=target_string|pos=index_value}} Parameters target: The string to search pos: The index for the character to return If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. The first character has an index value of 1. If one requests a negative value, this function will select a character by counting backwards from the end of the string. In other words pos = -1 is the same as asking for the last character. A requested value of zero, or a value greater than the length of the string returns an error. ]] function str.pos( frame ) local new_args = str._getParameters( frame.args, {'target', 'pos'} ) local target_str = new_args['target'] or '' local pos = tonumber( new_args['pos'] ) or 0 if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then return str._error( 'String index out of range' ) end return mw.ustring.sub( target_str, pos, pos ) end --[[ str_find This function duplicates the behavior of {{str_find}}, including all of its quirks. This is provided in order to support existing templates, but is NOT RECOMMENDED for new code and templates. New code is recommended to use the "find" function instead. Returns the first index in "source" that is a match to "target". Indexing is 1-based, and the function returns -1 if the "target" string is not present in "source". Important Note: If the "target" string is empty / missing, this function returns a value of "1", which is generally unexpected behavior, and must be accounted for separatetly. ]] function str.str_find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target'} ) local source_str = new_args['source'] or '' local target_str = new_args['target'] or '' if target_str == '' then return 1 end local start = mw.ustring.find( source_str, target_str, 1, true ) if start == nil then start = -1 end return start end --[[ find This function allows one to search for a target string or pattern within another string. Usage: {{#invoke:String|find|source_str|target_string|start_index|plain_flag}} OR {{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}} Parameters source: The string to search target: The string or pattern to find within source start: The index within the source string to start the search, defaults to 1 plain: Boolean flag indicating that target should be understood as plain text and not as a Lua style regular expression, defaults to true If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. This function returns the first index >= "start" where "target" can be found within "source". Indices are 1-based. If "target" is not found, then this function returns 0. If either "source" or "target" are missing / empty, this function also returns 0. This function should be safe for UTF-8 strings. ]] function str.find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['target'] or '' local start_pos = tonumber(new_args['start']) or 1 local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return 0 end plain = str._getBoolean( plain ) local start = mw.ustring.find( source_str, pattern, start_pos, plain ) if start == nil then start = 0 end return start end --[[ replace This function allows one to replace a target string or pattern within another string. Usage: {{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}} OR {{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string| count=replacement_count|plain=plain_flag}} Parameters source: The string to search pattern: The string or pattern to find within source replace: The replacement text count: The number of occurences to replace, defaults to all. plain: Boolean flag indicating that pattern should be understood as plain text and not as a Lua style regular expression, defaults to true ]] function str.replace( frame ) local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['pattern'] or '' local replace = new_args['replace'] or '' local count = tonumber( new_args['count'] ) local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return source_str end plain = str._getBoolean( plain ) if plain then pattern = str._escapePattern( pattern ) replace = mw.ustring.gsub( replace, "%%", "%%%%" ) --Only need to escape replacement sequences. end local result if count ~= nil then result = mw.ustring.gsub( source_str, pattern, replace, count ) else result = mw.ustring.gsub( source_str, pattern, replace ) end return result end --[[ simple function to pipe string.rep to templates. ]] function str.rep( frame ) local repetitions = tonumber( frame.args[2] ) if not repetitions then return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' ) end return string.rep( frame.args[1] or '', repetitions ) end --[[ escapePattern This function escapes special characters from a Lua string pattern. See [1] for details on how patterns work. [1] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns Usage: {{#invoke:String|escapePattern|pattern_string}} Parameters pattern_string: The pattern string to escape. ]] function str.escapePattern( frame ) local pattern_str = frame.args[1] if not pattern_str then return str._error( 'No pattern string specified' ) end local result = str._escapePattern( pattern_str ) return result end --[[ count This function counts the number of occurrences of one string in another. ]] function str.count(frame) local args = str._getParameters(frame.args, {'source', 'pattern', 'plain'}) local source = args.source or '' local pattern = args.pattern or '' local plain = str._getBoolean(args.plain or true) if plain then pattern = str._escapePattern(pattern) end local _, count = mw.ustring.gsub(source, pattern, '') return count end --[[ endswith This function determines whether a string ends with another string. ]] function str.endswith(frame) local args = str._getParameters(frame.args, {'source', 'pattern'}) local source = args.source or '' local pattern = args.pattern or '' if pattern == '' then -- All strings end with the empty string. return "yes" end if mw.ustring.sub(source, -mw.ustring.len(pattern), -1) == pattern then return "yes" else return "" end end --[[ join Join all non empty arguments together; the first argument is the separator. Usage: {{#invoke:String|join|sep|one|two|three}} ]] function str.join(frame) local args = {} local sep for _, v in ipairs( frame.args ) do if sep then if v ~= '' then table.insert(args, v) end else sep = v end end return table.concat( args, sep or '' ) end --[[ Helper function that populates the argument list given that user may need to use a mix of named and unnamed parameters. This is relevant because named parameters are not identical to unnamed parameters due to string trimming, and when dealing with strings we sometimes want to either preserve or remove that whitespace depending on the application. ]] function str._getParameters( frame_args, arg_list ) local new_args = {} local index = 1 local value for _, arg in ipairs( arg_list ) do value = frame_args[arg] if value == nil then value = frame_args[index] index = index + 1 end new_args[arg] = value end return new_args end --[[ Helper function to handle error messages. ]] function str._error( error_str ) local frame = mw.getCurrentFrame() local error_category = frame.args.error_category or 'Errors reported by Module String' local ignore_errors = frame.args.ignore_errors or false local no_category = frame.args.no_category or false if str._getBoolean(ignore_errors) then return '' end local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>' if error_category ~= '' and not str._getBoolean( no_category ) then error_str = '[[Category:' .. error_category .. ']]' .. error_str end return error_str end --[[ Helper Function to interpret boolean strings ]] function str._getBoolean( boolean_str ) local boolean_value if type( boolean_str ) == 'string' then boolean_str = boolean_str:lower() if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0' or boolean_str == '' then boolean_value = false else boolean_value = true end elseif type( boolean_str ) == 'boolean' then boolean_value = boolean_str else error( 'No boolean value found' ) end return boolean_value end --[[ Helper function that escapes all pattern characters so that they will be treated as plain text. ]] function str._escapePattern( pattern_str ) return mw.ustring.gsub( pattern_str, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1" ) end return str 6df794dd52434e0f6a372c9918f5a9dedd15f579 Module:String/doc 828 94 159 2024-02-10T01:28:26Z Aniceto 2 Created page with "{{Documentation}} {{Wikipedia template}} This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace. == Global options == ; ignore_e..." wikitext text/x-wiki {{Documentation}} {{Wikipedia template}} This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace. == Global options == ; ignore_errors : If set to 'true' or 1, any error condition will result in an empty string being returned rather than an error message. ; error_category : If an error occurs, specifies the name of a category to include with the error message. The default category is {{clc|Errors reported by Module String}}. ; no_category : If set to 'true' or 1, no category will be added if an error is generated. Unit tests for this module are available at [[Module:String/testcases]]. == len == This function returns the length of the target string. Usage: : <code><nowiki>{{#invoke:</nowiki>String|len|''target_string''}}</code> OR : <code><nowiki>{{#invoke:</nowiki>String|len|s= ''target_string'' }}</code> Parameters: ; s : The string whose length to report Examples: * <code><nowiki>{{#invoke:String|len| abcdefghi }}</nowiki></code> → {{#invoke:String|len| abcdefghi }} * <code><nowiki>{{#invoke:String|len|s= abcdefghi }}</nowiki></code> → {{#invoke:String|len|s= abcdefghi }} == sub == This function returns a substring of the target string at specified inclusive, one-indexed indices. Usage: : <code><nowiki>{{#invoke:</nowiki>String|sub|''target_string''|''start_index''|''end_index''}}</code> OR : <code><nowiki>{{#invoke:</nowiki>String|sub|s= ''target_string'' |i= ''start_index'' |j= ''end_index'' }}</code> Parameters: ; s : The string to return a subset of ; i : The first index of the substring to return, defaults to 1. ; j : The last index of the string to return, defaults to the last character. The first character of the string is assigned an index of 1. If either i or j is a negative value, it is interpreted the same as selecting a character by counting from the end of the string. Hence, a value of -1 is the same as selecting the last character of the string. If the requested indices are out of range for the given string, an error is reported. To avoid error messages, use {{ml|ustring|sub}} instead. Examples: * <code><nowiki>"{{#invoke:String|sub| abcdefghi }}"</nowiki></code> → "{{#invoke:String|sub| abcdefghi }}" * <code><nowiki>"{{#invoke:String|sub|s= abcdefghi }}"</nowiki></code> → "{{#invoke:String|sub|s= abcdefghi }}" * <code><nowiki>"{{#invoke:String|sub| abcdefghi | 3 }}"</nowiki></code> → "{{#invoke:String|sub| abcdefghi | 3 }}" * <code><nowiki>"{{#invoke:String|sub|s= abcdefghi |i= 3 }}"</nowiki></code> → "{{#invoke:String|sub|s= abcdefghi |i= 3 }}" * <code><nowiki>"{{#invoke:String|sub| abcdefghi | 3 | 4 }}"</nowiki></code> → "{{#invoke:String|sub| abcdefghi | 3 | 4 }}" * <code><nowiki>"{{#invoke:String|sub|s= abcdefghi |i= 3 |j= 4 }}"</nowiki></code> → "{{#invoke:String|sub|s= abcdefghi |i= 3 |j= 4 }}" == sublength == This function implements the features of {{tl|str sub old}} and is kept in order to maintain these older templates. It returns a substring of the target string starting at a specified index and of a specified length. Usage: : <code><nowiki>{{#invoke:</nowiki>String|sublength|s= ''target_string'' |i= ''start_index'' |len= ''length'' }}</code> Parameters: ; s : The string ; i : The starting index of the substring to return. The first character of the string is assigned an index of 0. ; len : The length of the string to return, defaults to the last character. Examples: * <code><nowiki>{{#invoke:String|sublength|s= abcdefghi }}</nowiki></code> → {{#invoke:String|sublength|s= abcdefghi }} * <code><nowiki>{{#invoke:String|sublength|s= abcdefghi |i= 3 }}</nowiki></code> → {{#invoke:String|sublength|s= abcdefghi |i= 3 }} * <code><nowiki>{{#invoke:String|sublength|s= abcdefghi |i= 3 |len= 4 }}</nowiki></code> → {{#invoke:String|sublength|s= abcdefghi |i= 3 |len= 4 }} == match == This function returns a substring from the source string that matches a specified pattern. Usage: : <code><nowiki>{{#invoke:</nowiki>String|match|''source_string''|''pattern_string''|''start_index''|''match_number''|''plain_flag''|''nomatch_output''}}</code> OR : <code><nowiki>{{#invoke:</nowiki>String|match|s= ''source_string'' |pattern= ''pattern_string'' |start= ''start_index'' |match= ''match_number'' |plain= ''plain_flag'' |nomatch= ''nomatch_output'' }}</code> Parameters: ; s : The string to search ; pattern : The pattern or string to find within the string ; start : The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. ; match : In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. ; plain : Boolean flag indicating that pattern should be understood as plain text and not as a [[mw:Extension:Scribunto/Lua reference manual#Ustring patterns|Scribunto ustring pattern]] (a unicode-friendly [[w:en:Lua (programming language)|Lua]]-style [[w:en:regular expression|regular expression]]). Defaults to false (to change: <code>plain=true</code>) ; nomatch : If no match is found, output the "nomatch" value rather than an error. ; ignore_errors : If no match is found and ignore_errors=true, output an empty string rather than an error. If the match_number or start_index are out of range for the string being queried, then this function generates an error. An error is also generated if no match is found. If one adds the parameter ignore_errors=true, then the error will be suppressed and an empty string will be returned on any failure. For information on constructing [[w:en:Lua (programming language)|Lua]] patterns, a form of [[w:en:regular expression|regular expression]], see: * [[mw:Extension:Scribunto/Lua_reference_manual#Patterns|Scribunto patterns]] * [[mw:Extension:Scribunto/Lua_reference_manual#Ustring_patterns|Scribunto Unicode string patterns]] Examples: * <code><nowiki>{{#invoke:String|match| abc123def456 |%d+}}</nowiki></code> → {{#invoke:String|match| abc123def456 |%d+}} * <code><nowiki>{{#invoke:String|match|s= abc123def456 |pattern= %d+ }}</nowiki></code> → {{#invoke:String|match|s= abc123def456 |pattern= %d+ }} * <code><nowiki>{{#invoke:String|match| abc123def456 |%d+|6}}</nowiki></code> → {{#invoke:String|match| abc123def456 |%d+|6}} * <code><nowiki>{{#invoke:String|match|s= abc123def456 |pattern= %d+ |start= 6 }}</nowiki></code> → {{#invoke:String|match|s= abc123def456 |pattern= %d+ |start= 6 }} * <code><nowiki>{{#invoke:String|match|s= abc123def456 |pattern= %d+ |start= 6 |match= 2 }}</nowiki></code> → {{#invoke:String|match|s= abc123def456 |pattern= %d+ |start= 6 |match= 2 }} * <code><nowiki>{{#invoke:String|match|s= abc123%d+ |pattern= %d+ }}</nowiki></code> → {{#invoke:String|match|s= abc123%d+ |pattern= %d+ }} * <code><nowiki>{{#invoke:String|match|s= abc123%d+ |pattern= %d+ |plain= true }}</nowiki></code> → {{#invoke:String|match|s= abc123%d+ |pattern= %d+ |plain= true }} * <code><nowiki>{{#invoke:String|match|s= abc |pattern= %d }}</nowiki></code> → {{#invoke:String|match|s= abc |pattern= %d |no_category=true}} * <code><nowiki>{{#invoke:String|match|s= abc |pattern= %d |nomatch= No numeric characters in string }}</nowiki></code> → {{#invoke:String|match|s= abc |pattern= %d |nomatch= No numeric characters in string }} * <code><nowiki>{{#invoke:String|match|s= abc |pattern= %d |ignore_errors= true }}</nowiki></code> → {{#invoke:String|match|s= abc |pattern= %d |ignore_errors= true }} * <code><nowiki>{{#invoke:String|match|s= 0012001200 |pattern= 0*(%d*) }}</nowiki></code> → {{#invoke:String|match|s= 0012001200 |pattern= 0*(%d*) }} == pos == This function returns a single character from the target string at position pos. Usage: : <code><nowiki>{{#invoke:</nowiki>String|pos|''target_string''|''index_value''}}</code> OR : <code><nowiki>{{#invoke:</nowiki>String|pos|target= ''target_string'' |pos= ''index_value'' }}</code> Parameters: ; target : The string to search ; pos : The index for the character to return The first character has an index value of 1. If one requests a negative value, this function will select a character by counting backwards from the end of the string. In other words pos = -1 is the same as asking for the last character. A requested value of zero, or a value greater than the length of the string returns an error. Examples: * <code><nowiki>{{#invoke:String|pos| abcdefghi | 4 }}</nowiki></code> → {{#invoke:String|pos| abcdefghi | 4 }} * <code><nowiki>{{#invoke:String|pos|target= abcdefghi |pos= 4 }}</nowiki></code> → {{#invoke:String|pos|target= abcdefghi |pos= 4 }} == str_find == This function duplicates the behavior of {{tl|str_find}}, including all of its quirks. This is provided in order to support existing templates, but is NOT RECOMMENDED for new code and templates. New code is recommended to use the "find" function instead. Returns the first index in "source" that is a match to "target". Indexing is 1-based, and the function returns -1 if the "target" string is not present in "source". Important Note: If the "target" string is empty / missing, this function returns a value of "1", which is generally unexpected behavior, and must be accounted for separately. Usage: : <code><nowiki>{{#invoke:</nowiki>String|str_find|''source_string''|''target_string''}}</code> OR : <code><nowiki>{{#invoke:</nowiki>String|str_find|source= ''source_string'' |target= ''target_string'' }}</code> Parameters: ; source : The string to search ; target : The string to find within source Examples: * <code><nowiki>{{#invoke:String|str_find| abc123def }}</nowiki></code> → {{#invoke:String|str_find| abc123def }} * <code><nowiki>{{#invoke:String|str_find|source= abc123def }}</nowiki></code> → {{#invoke:String|str_find|source= abc123def }} * <code><nowiki>{{#invoke:String|str_find| abc123def |123}}</nowiki></code> → {{#invoke:String|str_find| abc123def |123}} * <code><nowiki>{{#invoke:String|str_find|source= abc123def |target= 123 }}</nowiki></code> → {{#invoke:String|str_find|source= abc123def |target= 123 }} * <code><nowiki>{{#invoke:String|str_find| abc123def |not}}</nowiki></code> → {{#invoke:String|str_find| abc123def |not}} == find == This function allows one to search for a target string or pattern within another string. Usage: : <code><nowiki>{{#invoke:</nowiki>String|find|''source_string''|''target_string''|''start_index''|''plain_flag''}}</code> OR : <code><nowiki>{{#invoke:</nowiki>String|find|source= ''source_string'' |target= ''target_string'' |start= ''start_index'' |plain= ''plain_flag'' }}</code> Parameters: ; source : The string to search ; target : The string or pattern to find within source ; start : The index within the source string to start the search, defaults to 1 ; plain : Boolean flag indicating that target should be understood as plain text and not as a [[mw:Extension:Scribunto/Lua reference manual#Ustring patterns|Scribunto ustring pattern]] (a unicode-friendly [[w:en:Lua (programming language)|Lua]]-style [[w:en:regular expression|regular expression]]); defaults to true This function returns the first index >= "start" where "target" can be found within "source". Indices are 1-based. If "target" is not found, then this function returns 0. If either "source" or "target" are missing / empty, this function also returns 0. This function should be safe for UTF-8 strings. Examples: * <code><nowiki>{{#invoke:String|find|abc123def|12}}</nowiki></code> → {{#invoke:String|find|abc123def|12}} * <code><nowiki>{{#invoke:String|find|source=abc123def|target=12}}</nowiki></code> → {{#invoke:String|find|source=abc123def|target=12}} * <code><nowiki>{{#invoke:String|find|source=abc123def|target=pqr}}</nowiki></code> → {{#invoke:String|find|source=abc123def|target=pqr}} * <code><nowiki>{{#invoke:String|find| abc123def |123}}</nowiki></code> → {{#invoke:String|find| abc123def |123}} * <code><nowiki>{{#invoke:String|find|source= abc123def |target= 123 }}</nowiki></code> → {{#invoke:String|find|source= abc123def |target= 123 }} * <code><nowiki>{{#invoke:String|find|source=abc123def|target=%d |start=3 |plain=false }}</nowiki></code> → {{#invoke:String|find|source=abc123def|target=%d |start=3 |plain=false }} When using unnamed parameters, preceding and trailing spaces are kept and counted: * <code><nowiki>{{#invoke:String|find| abc123def |c|false}}</nowiki></code> → {{#invoke:String|find| abc123def |c|false}} * <code><nowiki>{{#invoke:String|find|source= abc123def |target=c|plain=false}}</nowiki></code> → {{#invoke:String|find|source= abc123def |target=c|plain=false}} * <code><nowiki>{{#invoke:string|find|abc 123 def|%s|plain=false}}</nowiki></code> → {{#invoke:string|find|abc 123 def|%s|plain=false}} Testing for the presence of a string: * <code>{{pf|ifexpr|<nowiki>{{#invoke:string|find|haystack|needle}}</nowiki>|Found needle|Didn't find needle}}</code> → {{#ifexpr:{{#invoke:string|find|haystack|needle}}|Found needle|Didn't find needle}} {{anchor|replace}} == replace (gsub) == This function allows one to replace a target string or pattern within another string. To Lua programmers: this function works internally by calling <code>[[mw:Extension:Scribunto/Lua_reference_manual#mw.ustring.gsub|mw.ustring.gsub]]</code>. Usage: : <code><nowiki>{{#invoke:</nowiki>String|replace|''source_str''|''pattern_string''|''replace_string''|''replacement_count''|''plain_flag''}}</code> OR : <code><nowiki>{{#invoke:</nowiki>String|replace|source= ''source_string'' |pattern= ''pattern_string'' |replace= ''replace_string'' |count= ''replacement_count'' |plain= ''plain_flag'' }}</code> Parameters: ; source : The string to search ; pattern : The string or pattern to find within source ; replace : The replacement text ; count : The number of occurrences to replace; defaults to all ; plain : Boolean flag indicating that pattern should be understood as plain text and not as a [[mw:Extension:Scribunto/Lua reference manual#Ustring patterns|Scribunto ustring pattern]] (a unicode-friendly [[w:en:Lua (programming language)|Lua]]-style [[w:en:regular expression|regular expression]]); defaults to true Examples: * <code><nowiki>"{{#invoke:String|replace| abc123def456 |123|XYZ}}"</nowiki></code> → "{{#invoke:String|replace| abc123def456 |123|XYZ}}" * <code><nowiki>"{{#invoke:String|replace|source= abc123def456 |pattern= 123 |replace= XYZ }}"</nowiki></code> → "{{#invoke:String|replace|source= abc123def456 |pattern= 123 |replace= XYZ }}" * <code><nowiki>"{{#invoke:String|replace| abc123def456 |%d+|XYZ|1|false}}"</nowiki></code> → "{{#invoke:String|replace| abc123def456 |%d+|XYZ|1|false}}" * <code><nowiki>"{{#invoke:String|replace|source= abc123def456 |pattern= %d+ |replace= XYZ |count=1 |plain= false }}"</nowiki></code> → "{{#invoke:String|replace|source= abc123def456 |pattern= %d+ |replace= XYZ |count=1 |plain= false }}" * <code><nowiki>"{{#invoke:String|replace|source= abc123def456 |pattern= %d+ |replace= XYZ |plain= false }}"</nowiki></code> → "{{#invoke:String|replace|source= abc123def456 |pattern= %d+ |replace= XYZ |plain= false }}" * <code><nowiki>{{#invoke:String|replace|source= 0012001200 |pattern= ^0* |plain= false }}</nowiki></code> → {{#invoke:String|replace|source= 0012001200 |pattern= ^0* |plain= false }} == rep == Repeats a string ''n'' times. A simple function to pipe string.rep to templates. Usage: : <code><nowiki>{{#invoke:</nowiki>String|rep|''source''|''count''}}</code> Parameters: ; source : The string to repeat ; count : The number of repetitions. Examples: * <code><nowiki>"{{#invoke:String|rep|hello|3}}"</nowiki></code> → "{{#invoke:String|rep|hello|3}}" * <code><nowiki>"{{#invoke:String|rep| hello | 3 }}"</nowiki></code> → "{{#invoke:String|rep| hello | 3 }}" == escapePattern == In a [[:mw:LUAREF#Patterns|Lua pattern]], changes a ''class character'' into a ''literal character''. For example: in a pattern, character <code>.</code> catches "any character"; escapePattern will convert it to <code>%.</code>, catching just the literal character ".". Usage: * <code><nowiki>{{#invoke:String|escapePattern|</nowiki>''pattern_string''<nowiki>}}</nowiki></code> Parameters: ; pattern_string : The pattern string to escape Examples: * <code><nowiki>"{{#invoke:String|escapePattern|A.D.}}"</nowiki></code> → "{{#invoke:String|escapePattern|A.D.}}" * <code><nowiki>"{{#invoke:String|escapePattern|10%}}"</nowiki></code> → "{{#invoke:String|escapePattern|10%}}" == count == Counts the number of times a given pattern appears in the arguments that get passed on to this module. Counts disjoint matches only. Usage: : <code><nowiki>{{#invoke:</nowiki>String|count|''source_str''|''pattern_string''|''plain_flag''}}</code> OR : <code><nowiki>{{#invoke:</nowiki>String|count|source= ''source_string'' |pattern= ''pattern_string''|plain= ''plain_flag'' }}</code> Parameters: ; source_string : The string to count occurrences in ; pattern : The string or pattern to count occurrences of within source ; plain : Boolean flag indicating that pattern should be understood as plain text and not as a [[mw:Extension:Scribunto/Lua reference manual#Ustring patterns|Scribunto ustring pattern]] (a unicode-friendly [[w:en:Lua (programming language)|Lua]]-style [[w:en:regular expression|regular expression]]); defaults to true Examples: * Count of 'a': <code><nowiki>"{{#invoke:String|count|aabbcc|a}}"</nowiki></code> → "{{#invoke:String|count|aabbcc|a}}" * Count occurrences of 'aba': <code><nowiki>"{{#invoke:String|count|ababababab|aba}}"</nowiki></code> → "{{#invoke:String|count|ababababab|aba}}" * Count of "either 'a' or 'c' ":<code><nowiki>"{{#invoke:String|count|aabbcc|[ac]|plain=false}}"</nowiki></code> → "{{#invoke:String|count|aabbcc|[ac]|plain=false}}" * Count of "not 'a' ": <code><nowiki>"{{#invoke:String|count|aaabaaac|[^a]|plain=false}}"</nowiki></code> → "{{#invoke:String|count|aaabaaac|[^a]|plain=false}}" * Count of "starts with 'a' ": <code><nowiki>"{{#invoke:String|count|aaabaaac|^a|plain=false}}"</nowiki></code> → "{{#invoke:String|count|aaabaaac|^a|plain=false}}" == join == Joins all strings passed as arguments into one string, treating the first argument as a separator Usage: : <code><nowiki>{{#invoke:</nowiki>String|join|''separator''|''string1''|''string2''|...}}</code> Parameters: ; separator : String that separates each string being joined together : Note that leading and trailing spaces are ''not'' stripped from the separator. ; string1/string2/... : Strings being joined together Examples: * <code><nowiki>"{{#invoke:String|join|x|foo|bar|baz}}"</nowiki></code> → "{{#invoke:String|join|x|foo|bar|baz}}" * <code><nowiki>"{{#invoke:String|join||a|b|c|d|e|f|g}}"</nowiki></code> → "{{#invoke:String|join||a|b|c|d|e|f|g}}" * <code><nowiki>"{{#invoke:String|join|,|a|b|c|d|e|f|g}}"</nowiki></code> → "{{#invoke:String|join|,|a|b|c|d|e|f|g}}" * <code><nowiki>"{{#invoke:String|join|, |a|b|c|d|e|f|g}}"</nowiki></code> → "{{#invoke:String|join|, |a|b|c|d|e|f|g}}" * <code><nowiki>"{{#invoke:String|join| &ndash; |a|b|c|d|e|f|g}}"</nowiki></code> → "{{#invoke:String|join| &ndash; |a|b|c|d|e|f|g}}" The preceding example uses the html entity &amp;ndash; but the unicode character also works. == endswith == {{for|the startswith function|Module:String2#startswith}} Usage: : <code><nowiki>{{#invoke:</nowiki>String|endswith|''source_str''|''search_string''}}</code> OR : <code><nowiki>{{#invoke:</nowiki>String|endswith|source= ''source_string'' |pattern= ''search_string''}}</code> Returns "yes" if the source string ends with the search string. Use named parameters to have the strings trimmed before use. Despite the parameter name, ''search_string'' is not a Lua pattern, it is interpreted literally. * <code><nowiki>"{{#invoke:String|endswith|xxxyyy|y}}"</nowiki></code> → "{{#invoke:String|endswith|xxxyyy|y}}" * <code><nowiki>"{{#invoke:String|endswith|xxxyyy|z}}"</nowiki></code> → "{{#invoke:String|endswith|xxxyyy|z}}" 3f2e352d26cf80c5b4c0965e82ed030dd24c8277 File:WikimediaUI-Palette.svg 6 95 160 2024-02-10T01:29:46Z Aniceto 2 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Template:Main page/event/styles.css 10 96 161 2024-02-10T01:33:32Z Aniceto 2 Created page with ".home-event .home-card { height: 5rem; } .home-event .home-card__background:after { /* * Theme gradient color * FIXME: Find a way to make customize it through wikitext */ background: linear-gradient(to right,#101e3c,transparent); }" wikitext text/x-wiki .home-event .home-card { height: 5rem; } .home-event .home-card__background:after { /* * Theme gradient color * FIXME: Find a way to make customize it through wikitext */ background: linear-gradient(to right,#101e3c,transparent); } eb5ae07e21362e98a0c30118d5768b36bc7a3517